Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Mar 7, 2007 - 7:53 PM
|
Dear Support,
I need to keep extra information for a grid-cell or a grid row. I could not find any SetItemData function like the one found in any other control.
Please advise.
Thanks, Ron.
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 1:22 AM
|
CExtGridCell::LParamSet: Sets the user-defined LPARAM value and returns the previous value.
virtual LPARAM LParamSet( LPARAM lParamNew = 0L );
|
|
Offer Har
|
Mar 7, 2007 - 5:59 PM
|
Dear Support,
I have a grid with an outer column. When clicking cells in this column nothing happens. Is there a way to make the click select the whole row?
Thanks, Ron.
|
|
Offer Har
|
Mar 7, 2007 - 6:13 PM
|
Got it ! __EGBS_SF_SELECT_OUTER_ROWS It seems that there is a great demo of the grid capabilities I missed... SimpleGrids
|
|
Offer Har
|
Mar 7, 2007 - 5:55 PM
|
Dear Support,
I have a grid that the left column (a fixed column) has a running number. The grid can be sorted, using the default sort - the flag __EGWS_BSE_SORT_COLUMNS I would like the numbers to remain in order (1,2,3...) even when the grid is sorted by another column.
Is there a way to prevent the left column from being sorted? If not, is there any event / virtual function I can use when the sorting is over so that I will change the texts in all the cells of the left column?
Thanks, Ron.
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 1:25 AM
|
Try using __EGCS_HDR_ROW_COLUMN_NUMBER style for the cells of the left, fixed column instead setting the numbers yourself. This one is also shown in SimpleGrids sample.
|
|
Offer Har
|
Mar 7, 2007 - 4:51 PM
|
Dear Support,
I have a grid derived class which i initialize to have one header row on the left side, and one at the top. I would like to access the top-left cell for writing something in it.
How do I do it?
Thanks, Ron.
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 1:37 AM
|
Support’s answer to this one from a previous post: The grid control does not display cell objects in corners but you can repaint them if you need to display some information there. You should override the CExtGridBaseWnd::OnGbwEraseArea() virtual method like as follows: void C_YOUR_GridWnd::OnGbwEraseArea(CDC & dc, const RECT & rcArea, DWORD dwAreaFlags) const
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
COLORREF clrDebugFill = COLORREF( -1L );
switch( dwAreaFlags )
{
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_TOP: clrDebugFill = RGB( 255, 128, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_BOTTOM: clrDebugFill = RGB( 128, 255, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT: clrDebugFill = RGB( 128, 128, 255 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT: clrDebugFill = RGB( 128, 255, 255 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT|__EGBWA_OUTER_TOP: clrDebugFill = RGB( 255, 128, 255 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT|__EGBWA_OUTER_BOTTOM: clrDebugFill = RGB( 255, 255, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT|__EGBWA_OUTER_TOP: clrDebugFill = RGB( 255, 255, 128 ); break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT|__EGBWA_OUTER_BOTTOM: clrDebugFill = RGB( 128, 128, 128 ); break;
case __EGBWA_INNER_CELLS: clrDebugFill = RGB( 255, 255, 224 ); break;
}
if( clrDebugFill != COLORREF( -1L ) )
dc.FillSolidRect( &rcArea, clrDebugFill );
}
|
|
Brian Horn
|
Mar 7, 2007 - 4:26 PM
|
Question In MDI application I have created 2 ribbonbar. When application starts I show default ribbonbar which is similar to MDI application default menu(fig 1.). 1. First problem is that in my application TestApp Name is not coming in middle of title bar. Its Left aligned. Can you tell me how to make this text Middle aligned on title bar of ribbonbar? 2. On click of File/New from application bar. I’m displaying my customized 2nd ribbonbar shown in second fig. and destroying first one. Again when I click on File/Close I’m again creating default ribbonbar once again and hiding customize ribbonbar. When I again open any file in my application then its showing title bar and below that Its creating ribbonbar. Please see the difference in both images. And can you tell me how to hide this title bar in fig 2?
Detailed pictures are send to support@prof-uis.com with from Address Kuna.
|
|
Technical Support
|
Mar 9, 2007 - 10:52 AM
|
So far we have not received the pictures.
|
|
Rado Manzela
|
Mar 7, 2007 - 9:51 AM
|
Is it possible to make intellisense working with your library in VC6.0 ? Thank you
|
|
Rado Manzela
|
Mar 9, 2007 - 10:19 AM
|
I’ve included includes only, it works, thank you!
|
|
Rado Manzela
|
Mar 9, 2007 - 9:30 AM
|
I have those options already set in my VC but it’s not working :(
|
|
Technical Support
|
Mar 9, 2007 - 9:50 AM
|
We are sorry: the Include and Src folders folders should be added to the Source files directories list
|
|
Technical Support
|
Mar 9, 2007 - 9:07 AM
|
You can turn on the intellisense by adding Prof-UIS to the Include and Src folders in the directories list (Tools->Options->Directories).
|
|
Rado Manzela
|
Mar 7, 2007 - 9:46 AM
|
It seems there is some bug in CExtGridCellNumber / variant. Assigning 64 bit value (for example _VariantAssign((__int64)val)) is not working on Windows 98. (In win XP it works). I’ve tried release/statical exe in win 98. Can you please check this ? Thank you
P.S. I guess there is also typo in the library - compilation is printing MCBS Selected instead of MBCS ;)
|
|
Rado Manzela
|
Mar 12, 2007 - 12:58 PM
|
Thank you for response. I apologize for bad report, the "MCBS" mistake is in another library I’m using I’ve thought it is your library :)
|
|
Technical Support
|
Mar 9, 2007 - 10:44 AM
|
In grid cells, we use the VariantCopy() Win32 API provided by the OleAut32.DLL module. This API works correctly with 64-bit integers starting from Windows XP only. The only way to port 64-bit integers from one variant data structure to other one independently from OS version is to do this manually or use the CExtGridCell::stat_VariantSerializeData() static method to serialize/de-serialize variant data. Of course, we could implement a CExtGridCell::stat_VariantCopy() static method and use it in Prof-UIS but this would not be an ideal solution. We noticed that people often use the classes like COleVariant in MFC and CComVariant in ATL, but in both of them, of course, VariantCopy() is used.
Please let us know more details about MCBS because we failed to find it in the current version.
|
|
Ryan Pipkin
|
Mar 7, 2007 - 9:42 AM
|
I’m a newbie but I searched the forum and couldn’t find a similar issue. I used the sample code found in ProfUIS_Controls_800 project for the comboBox. I select from my comboBox which has the dropdown arrow. Instead of seeing a dropdown list, there are tiny scrollbars which only allows one item to appear at a time. I want the combobox to dropdown the entire list. I’ve checked the properties in my project and the sample project. Any help is appreciated.
|
|
Suhai Gyorgy
|
Mar 7, 2007 - 11:39 AM
|
This is MFC problem. The height of the combobox control determines how many rows appear in the dropdown list. In dialog design mode, try making the combobox much higher and check the result in the running application.
|
|
Paul Cowan
|
Mar 7, 2007 - 9:23 AM
|
How do I get CExtGridCellDropListComboBox to sort the strings?
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 2:43 AM
|
I think easiest way would be to just insert the strings sorted when the list is initialized.
If that’s not applicable in your case, the other solution would be to override every method that increases the number of items or changes text of any of them. These methods are (sorry if I miss any): AddItem, AddString, InsertItem, InsertString, SetItem, SetItemString. These methods should handle the proper ordering of the items, as well. Check original implementation of methods in CExtGridCellComboBox.
Actually there’s a method OnPopupListBoxInitContent, you could override that to have the items in the popup list shown in proper order, but by overriding just this method the control wouldn’t work properly when pressing up-down arrow to have the previous-next item selected, as the item-array inside the control wouldn’t be in proper order.
|
|
Suhai Gyorgy
|
Mar 7, 2007 - 6:47 AM
|
For some reason I wanted to test your SDI_DynamicBars sample, so I compiled and ran its Static Unicode Debug configuration on my VS2003. I was playing with its fullscreen-normal state closing the application and starting again many times. Some times, when I closed the application, it crashed. I couldn’t find out what I need to do to make it crash or not crash, it just happened randomly.
- Error message: Access violation reading location 0x018da3c4. - Value of this in CArray at that point: 0x018da3bc. - Call Stack: SDI_DynamicBars-sud.exe!CArray<CExtHookSink *,CExtHookSink *>::GetSize() Line 272 + 0x26 C++ SDI_DynamicBars-sud.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=130, unsigned int & wParam=0, long & lParam=0) Line 239 + 0xb C++ SDI_DynamicBars-sud.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00200a20, unsigned int nMessage=130, unsigned int wParam=0, long lParam=0) Line 287 + 0x14 C++ user32.dll!77d48734() user32.dll!77d4d05b() user32.dll!77d4b4c0() user32.dll!77d4dabd() ntdll.dll!7c90eae3() user32.dll!77d4daf6() SDI_DynamicBars-sud.exe!CWnd::DestroyWindow() Line 988 + 0xd C++ ...
Could you check this please? Thank you.
|
|
Stan Miasnikov
|
Mar 27, 2007 - 12:56 PM
|
I have the same problem now since I switched from 2.62 to 2.64... Is there a solution for this?
|
|
Technical Support
|
Mar 7, 2007 - 12:43 PM
|
Please let us know what is the library version you are using? The thing is we fixed it in the last version.
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 1:17 AM
|
I’m using your latest v2.64 Full library, downloaded from this website on February 22nd, 2007. Yes, I’ve read back the forum and saw posts stating it had been fixed, but I’m still experiencing it after a "Rebuild Solution".
|
|
Michael Clapp
|
Mar 6, 2007 - 7:30 PM
|
I’ve gone through installation, reinstallation (moved installation to different partition), and manual "unregister"ing and re"register"ing from the Prof-UIS/Help directory, and there does not appear to be integrated help for VS2005. My Visual Studio 6 installation seems fine. This is Prof-UIS 2.64.
|
|
Technical Support
|
Mar 7, 2007 - 12:59 PM
|
Please let us know if unfiltered is selected in the Filtered by: combo box.
|
|
Michael Clapp
|
Mar 7, 2007 - 3:15 PM
|
Now it is. It appears to work. Thanks.
|
|
Damien Castelltort
|
Mar 6, 2007 - 10:05 AM
|
Hi,
I’m currently working with Prof-UIS 2.63-4
My application manages many MDIFrame. I use a CExtToolControlBar in my mainframe to easily open the others MDIFrame.
I face a strange behaviour when I click in the CExtToolControlBar to open one of the MDIFrame, the newFrame open up and display correctly over the currently active mainframe.
When I try to click on the just spawned MDIFrame, it is the MainFrame that receives the event. I’m also using the same spawn code on one of my mainFrame menu command (not in a CExtControlMenuBar) and it works perfectly.
The toolbar seems to force its parent frame to stay on top. Do you have any ideas about how i can fix this issue. ?
Best Regards,
|
|
Technical Support
|
Mar 6, 2007 - 12:04 PM
|
It is hardly possible to say what’s wrong without knowing in which way you are creating MDI child frames. So if you cannot send us you project, would you modify and send us our MDI sample by adding a toolbar command that creates new MDI child frames so that it reproduces the problem?
|
|
tera t
|
Mar 6, 2007 - 7:49 AM
|
Hi,
An error is displayed when I use CToolBar in Prof.
Must not I use CToolBar in Prof?
|
|
Technical Support
|
Mar 6, 2007 - 8:01 AM
|
You cannot use CToolBar in Prof-UIS. Please use CExtToolControlBar instead.
|
|
tera t
|
Mar 5, 2007 - 5:30 PM
|
Hi
I want to do processing totally similar to the following samples in CExtControlToolBar.
Thank You
-------------------------------------------------------------------
struct stToolBarInfo { int btnId; // int imgIdx; // int strId; // };
#define XXX_TBAR_BUTTON_NUM 4 const stToolBarInfo cstTBarInfo[XXX_TBAR_BUTTON_NUM] = { {ID_BUTTON_1,0,IDS_BUTTON_1}, {ID_BUTTON_2,1,IDS_BUTTON_2}, {ID_BUTTON_3,2,IDS_BUTTON_3}, {ID_BUTTON_4,3,IDS_BUTTON_4} };
CToolBar m_wndToolBar;
int XXX::Load() {
m_wndToolBar.ModifyStyle(0,TBSTYLE_LIST); m_wndToolBar.LoadBitmap(IDB_XXX_TBAR_IMG); m_wndToolBar.SetButtons(NULL,XXX_TBAR_BUTTON_NUM); m_wndToolBar.SetBarStyle( m_wndToolBar.GetBarStyle() &~CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM &~CBRS_BORDER_RIGHT &~CBRS_BORDER_LEFT );
for(int i=0;i<XXX_TBAR_BUTTON_NUM;i++){ m_wndToolBar.SetButtonInfo(i,cstTBarInfo[i].btId,TBBS_BUTTON,cstTBarInfo[i].imgIdx); CString str(_T("")); str.LoadString(cstTBarInfo[i].strId); m_wndToolBar.SetButtonText(i,(LPCTSTR)str); } }
|
|
Technical Support
|
Mar 6, 2007 - 7:47 AM
|
In Prof-UIS, each toolbar button knows only its command identifier. All other information about the button (its icon, text, tooltip text and status tip text) is stored in the CExtCmdItem object associated with this button. These CExtCmdItem objects in turn are stored in the global g_CmdManager . So you should get/allocate the needed CExtCmdItem command description object first using g_CmdManager->CmdGetPtr() /g_CmdManager->CmdAllocPtr() and then modify its CExtCmdItem::m_*** properties.
|
|
Jia Hong Li
|
Mar 5, 2007 - 11:18 AM
|
I create some CTreeCtrl in CExtPageNavigatorWnd object, and all CTreeCtrl seem to be not scrollable. How could I do ?
|
|
Technical Support
|
Mar 6, 2007 - 9:39 AM
|
That line looks strange. Why do you create a new tree (m_TreeCtrl_AllFolder ) as a child of another tree (m_wndPNAllFolders )? m_TreeCtrl_AllFolder.Create(WS_VISIBLE|WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_LINESATROOT,
recta, &m_wndPNAllFolders, IDC_TREEDIR);
|
|
Jia Hong Li
|
Mar 6, 2007 - 10:37 PM
|
Sorry, I lose a line in my post code:
///////////////////////////// MainFrm.h ////////////////////////////////// ... CDirTreeCtrl m_TreeCtrl_AllFolder; ...
CDirTreeCtrl look like : http://picasaweb.google.com.tw/ooy.yoo/Others/photo#5039047524469930946 CDirTreeCtrl inheri from CTreeCtrl class
My unscrollable problem seem to have no concern with CDirTreeCtrl, but to m_wndResizableBarTree(CExtControlBar class) which I use for replacing the m_wndSplitter(CExtSplitterWnd class)
|
|
Jia Hong Li
|
Mar 6, 2007 - 10:48 PM
|
PS:
Original Structure in PageNavigator: CPNSplitterWnd --[contain]--> CExtPageNavigatorWnd --[constain]--> CTreeCtrl My Structure: CExtControlBar --[contain]--> CExtPageNavigatorWnd --[constain]--> CTreeCtrl --[contain]--> CDirTreeCtrl
The different (may cause of my unscrollable problem) is I use CExtControlBar instead of CPNSplitterWnd
|
|
Technical Support
|
Mar 7, 2007 - 6:08 AM
|
Your Structure should look like CExtControlBar -- [contain] --> CExtPageNavigatorWnd --[contain]--> CDirTreeCtrl So the CDirTreeCtrl control should be created as a child of the CExtPageNavigatorWnd , not CTreeCtrl . You can send the CDirTreeCtrl class to us so we can help you insert it into the page navigator.
|
|
Jia Hong Li
|
Mar 7, 2007 - 8:41 PM
|
Ok, I fix that problem now, thanks.
But the other problem: However I change the theme from UI Theme Switcher Toolbar, the Scrollbar look always is default gray
How could I change the theme of Scrollbar ??
|
|
Suhai Gyorgy
|
Mar 8, 2007 - 2:20 AM
|
The scrollbars you see are the scrollbars of the CDirTreeCtrl class, which I think is derived from CTreeCtrl, a pure MFC class, that’s why those scrollbars are not themed, because they have nothing to do with ProfUIS. But you can override CWnd::GetScrollBarCtrl method and have ProfUIS scrollbars created, thus they will be themed properly. Here’s how I think it should look like: class CDirTreeCtrl : public CTreeCtrl
{
...
protected:
CExtScrollBar m_wndScrollBarH, m_wndScrollBarV;
public:
virtual CScrollBar * GetScrollBarCtrl( int nBar ) const
{
ASSERT_VALID( this );
if( m_hWnd == NULL || (! ::IsWindow(m_hWnd) ) )
return NULL;
ASSERT( nBar == SB_HORZ || nBar == SB_VERT );
if( nBar == SB_HORZ )
{
if( m_wndScrollBarH.GetSafeHwnd() != NULL )
return ( const_cast < CExtScrollBar * > ( &m_wndScrollBarH ) );
} // if( nBar == SB_HORZ )
else
{
if( m_wndScrollBarV.GetSafeHwnd() != NULL )
return ( const_cast < CExtScrollBar * > ( &m_wndScrollBarV ) );
} // else from if( nBar == SB_HORZ )
return NULL;
}
virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = CTreeCtrl::WindowProc( message, wParam, lParam );
if ( message == WM_CREATE )
{
m_wndScrollBarH.m_eSO = CExtScrollBar::__ESO_BOTTOM;
m_wndScrollBarV.m_eSO = CExtScrollBar::__ESO_RIGHT;
if( ! m_wndScrollBarV.Create(
WS_CHILD|WS_VISIBLE|SBS_VERT|SBS_RIGHTALIGN,
CRect(0,0,0,0),
this,
1
)
)
{
ASSERT( FALSE );
break;
}
if( ! m_wndScrollBarH.Create(
WS_CHILD|WS_VISIBLE|SBS_HORZ|SBS_BOTTOMALIGN,
CRect(0,0,0,0),
this,
2
)
)
{
ASSERT( FALSE );
break;
}
m_wndScrollBarH.SyncReservedSpace( &m_wndScrollBarV );
m_wndScrollBarV.SyncReservedSpace( &m_wndScrollBarH );
//OnSwRecalcLayout( true ); // I’m not sure what to call instead of this and whether it’s needed at all.
}
return lResult;
}
...
};
Or if you already have a CDirTreeCtrl::OnCreate method implemented, the code snippet from WindowProc should be placed there.
|
|
Jia Hong Li
|
Mar 8, 2007 - 8:36 PM
|
Everything work find except "OnSwRecalcLayout(true)" How could I make sure how to use something like "OnSwRecalcLayout(true)"
|
|
Technical Support
|
Mar 9, 2007 - 10:36 AM
|
You can learn more about this if you look at this sample.
|
|
Jia Hong Li
|
Mar 5, 2007 - 7:51 PM
|
In other words, I need the TreeCtrl in the PageNavigator sample (allfolder, favorite, shortcut) to be scrollable
|
|
Jia Hong Li
|
Mar 6, 2007 - 2:04 AM
|
Now my app structure:
CExtControlBar --[contain]--> CExtPageNavigatorWnd --[constain]--> CTreeCtrl --[contain]--> CDirTreeCtrl
The Folder browsing in the CDirTreeCtrl won’t be scrollable
Code:
///////////////////////////// MainFrm.h ////////////////////////////////// ... CExtControlBar m_wndResizableBarTree; CExtPageNavigatorWnd m_wndPageNavigator; CTreeCtrl m_wndPNShortcuts; CTreeCtrl m_wndPNAllFolders; CTreeCtrl m_wndPNFavoriteFolders; ...
///////////////////////////// MainFrm.cpp ////////////////////////////////// ... _splash.SetStatusText(_T("Creating TreeBar ...")); m_wndResizableBarTree.SetInitDesiredSizeVertical( CSize( 200, 400 ) ); m_wndResizableBarTree.SetInitDesiredSizeHorizontal( CSize( 400, 200 ) ); if( !m_wndResizableBarTree.Create( _T("Folder Bar"), // _T("Optional control bar caption"), this, ID_VIEW_RESIZABLEBAR_TREE ) ) { TRACE0("Failed to create m_wndResizableBarTree\n"); return -1; // fail to create } m_wndPageNavigator.Create( &m_wndResizableBarTree, CRect(0, 0, 0, 0), m_wndResizableBarTree.GetDlgCtrlID() );
CExtPageNavigatorWnd::PAGE_ITEM_INFO * pPII = m_wndPageNavigator.ItemInsert( -1, _T("Folder List"), (HICON)::LoadImage( ::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_FOLDER_LIST), IMAGE_ICON, 24, 24, 0 ), (HICON)::LoadImage( ::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_FOLDER_LIST_SMALL), IMAGE_ICON, 16, 16, 0 ) );
m_wndPNAllFolders.Create( WS_CHILD|WS_VISIBLE|TVS_HASBUTTONS|TVS_LINESATROOT, CRect(0,0,0,0), &m_wndPageNavigator, UINT( IDC_STATIC ) );
HTREEITEM hItem = NULL; HTREEITEM hItemRoot = NULL;
m_wndPNAllFolders.Expand( hItem, TVE_EXPAND ); m_wndPNAllFolders.Expand( hItemRoot, TVE_EXPAND );
//get drawing area size CRect recta; GetClientRect(recta);
//Create TreeCtrl m_TreeCtrl_AllFolder.Create(WS_VISIBLE|WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_LINESATROOT, recta, &m_wndPNAllFolders, IDC_TREEDIR); m_TreeCtrl_AllFolder.iTreePath=CSIDL_DESKTOP ; m_TreeCtrl_AllFolder.Initialize();
pPII->PaneInsert( m_wndPNAllFolders.GetSafeHwnd(), -1, _T(""), 50, true ); ...
How could I do ?
|
|
Jean-Yves Tremblay
|
Mar 5, 2007 - 9:35 AM
|
|
|
Jia Hong Li
|
Mar 5, 2007 - 12:49 AM
|
How can I custom my own dialog theme like the ABOUT Dialog in the sample code? That means when I click CExtThemeSwitcherToolControlBar item, not only change form style but also change all dialog which I made. Thanks. Peace.ˆ.ˆ
|
|
Technical Support
|
Mar 5, 2007 - 11:20 AM
|
If you look at the declaration of CExtResizableDialog , you will see that its parent classes are wrapped in templates. One of these templates is CExtWS , which adds a theme-based background to a resizable dialog window. The skinned non-client area is provided by the CExtNCW template. So to make your dialog consistent with Prof-UIS themes, replace CDialog base class with CExtNCW < CExtResizableDialog > .
|
|
Jia Hong Li
|
Mar 8, 2007 - 8:37 PM
|
Thanks...I can custom my own dialog theme now, and thanks a lot. ˆ.ˆ
|
|
Brian Horn
|
Mar 2, 2007 - 11:40 AM
|
if we select any of the Office2007(release1/2/3) themes and then make mouse movement over the bar (any of restore/minimize/close button) a strong blinking takes place however if we select the theme other than that mentioned above it works fine.
Similarly in the Ribbonbar example from Prof-UIS if we select any of the themes of Office2007 and observe the Home -> Style Tab we can observe such similar effect where style gallery control looks twice.
How do we avoid the blinking and flickering?
|
|
Technical Support
|
Mar 2, 2007 - 12:47 PM
|
Thank you for reporting the bug. We fixed it and emailed you the information about how to download the update.
|
|
Brian Horn
|
Mar 5, 2007 - 11:03 AM
|
we are getting a following errors with new source code....
ExtGridWnd.cpp Prof-UIS is automatically linking with oleaut32.lib (OLE automation) \Program Files\FOSS Software Inc\Prof-UIS\Src\ExtGridWnd.cpp(44624) : error C2666: ’pow’ : 7 overloads have similar conversions C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(620): could be ’long double pow(long double,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(618): or ’long double pow(long double,long double)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(572): or ’float pow(float,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(570): or ’float pow(float,float)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(534): or ’double pow(int,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(532): or ’double pow(double,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(195): or ’double pow(double,double)’ while trying to match the argument list ’(int, double)’ \Program Files\FOSS Software Inc\Prof-UIS\Src\ExtGridWnd.cpp(44648) : error C2666: ’pow’ : 7 overloads have similar conversions C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(620): could be ’long double pow(long double,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(618): or ’long double pow(long double,long double)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(572): or ’float pow(float,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(570): or ’float pow(float,float)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(534): or ’double pow(int,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(532): or ’double pow(double,int)’ C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(195): or ’double pow(double,double)’ while trying to match the argument list ’(int, double)’
|
|
Technical Support
|
Mar 6, 2007 - 9:37 AM
|
Thank you for reporting the problem. Please replace the following line in the ExtGridWnd.cpp file: V_R8(&varRight) = pow( 2, DOUBLE(nPower) ); with V_R8(&varRight) = pow( 2.0, DOUBLE(nPower) ); This should fix the problem.
|
|
Suhai Gyorgy
|
Mar 2, 2007 - 8:03 AM
|
Dear Support,
We are just about to release a new version of our product, but while testing the Release version, we encountered a crash while closing the application. The crash happens somewhere inside CFrameWnd::DestroyWindow(), but only in Release, never in Debug.
We have tried to narrow down the possible causes of the crash. Our application is multilanguage, and we use the following code to set the correct text for the command with ID nCmdId: void RcStrings::set_command_strings(UINT nCmdId, HWND hWnd)
{
CExtCmdItem * pCmdItem =
g_CmdManager->CmdGetPtr(
g_CmdManager->ProfileNameFromWnd(hWnd),
nCmdId
);
ASSERT (pCmdItem != NULL );
TCHAR *pctCmdString = SysMem::alloc_string(get_rc_string(nCmdId));
TCHAR *pctBegin = pctCmdString;
TCHAR *pctEnd = SysChar::strchr(pctBegin, ’\n’); if (pctEnd) *pctEnd = EOS;
TCHAR *pctTab = SysChar::strchr(pctBegin, ’\t’); if (pctTab) *pctTab = EOS;
pCmdItem->m_sMenuText = pctBegin;
if (pctTab) pCmdItem->m_sAccelText = pctTab + 1;
if (pctEnd) {
pctBegin = pctEnd + 1;
pctEnd = SysChar::strchr(pctBegin, ’\n’); if (pctEnd) *pctEnd = EOS;
//pCmdItem->m_sTipStatus = pctBegin;
if (pctEnd) {
pctBegin = pctEnd + 1;
pctEnd = SysChar::strchr(pctBegin, ’\n’); if (pctEnd) *pctEnd = EOS;
pCmdItem->m_sTipTool = pctBegin;
}
}
SysMem::mem_free(pctCmdString, __FILE__, __LINE__);
}
get_rc_string(nCmdId) takes care of getting the appropiate command texts in "MenuText\tAccelText\nStatusTip\nToolTip" format (\tAcceltext part is optional). Crash always happens while closing the window, but only if I clicked on a command while running the application, or sometimes even enough if I just pop up one of the submenus. In our CMainFrame::OnCreate, we go through all the commands (they are listed in an array) to change their texts with RcStrings::set_command_strings. If I just command this loop, the crash dissappears. I tried to modify one of your samples to reproduce the problem, but didn’t succeed for now. I was hoping you could point me to a direction, what things I should check, what kind of changes were made around CExtCmdItem’s texts since your last version. The very same code runs smoothly when compiling with your v2.63. Our version release is stuck at the moment because of this. Thank you, Chris
|
|
Suhai Gyorgy
|
Mar 2, 2007 - 9:05 AM
|
Sorry, I forgot to add exception message: Access violation reading location 0x00000000.
|
|
Sergiy Lavrynenko
|
Mar 2, 2007 - 11:06 AM
|
Dear Chris,
This exception is not related to the CExtCmdItem class. Please let me know more details about the string initialization APIs listed in the root message of this thread. Where the text lines are really stored in? I mean the get_rc_string() API. Does this API access any cross-thread/cross-process COM-based interfaces?
|
|
Suhai Gyorgy
|
Mar 5, 2007 - 1:59 AM
|
To clarify it isn’t the string initialization to blame, I changed the mentioned method and removed call of get_rc_string(): void RcStrings::set_command_strings(UINT nCmdId, HWND hWnd)
{
CExtCmdItem * pCmdItem =
g_CmdManager->CmdGetPtr(
g_CmdManager->ProfileNameFromWnd(hWnd),
nCmdId
);
ASSERT (pCmdItem != NULL );
//TCHAR *pctCmdString = SysMem::alloc_string(get_rc_string(nCmdId));
TCHAR pctCmdString[] = _T("Test\tTest\nTest\nTest");
TCHAR *pctBegin = pctCmdString;
TCHAR *pctEnd = SysChar::strchr(pctBegin, ’\n’); if (pctEnd) *pctEnd = EOS;
TCHAR *pctTab = SysChar::strchr(pctBegin, ’\t’); if (pctTab) *pctTab = EOS;
pCmdItem->m_sMenuText = pctBegin;
if (pctTab) pCmdItem->m_sAccelText = pctTab + 1; // van Accel a Command-hoz
if (pctEnd) {
pctBegin = pctEnd + 1;
pctEnd = SysChar::strchr(pctBegin, ’\n’); if (pctEnd) *pctEnd = EOS;
pCmdItem->m_sTipStatus = pctBegin;
if (pctEnd) {
pctBegin = pctEnd + 1;
pctEnd = SysChar::strchr(pctBegin, ’\n’); if (pctEnd) *pctEnd = EOS;
pCmdItem->m_sTipTool = pctBegin;
}
}
//SysMem::mem_free(pctCmdString, __FILE__, __LINE__);
}
Crash still happens with this changed code, but if I comment out loop with calling of RcStrings::set_command_strings in CMainFrame::OnCreate, crash disappears. And as I wrote earlier, the very same code runs fine with previous version of Prof-UIS.
|
|
Technical Support
|
Mar 5, 2007 - 11:57 AM
|
Seems your project requires more detailed testing. In a simple case, the ASSERT( AfxCheckMemory() ); code should be inserted at all reasonable places in all the memory management code provided by the SysMem namespace. But this requires the memory allocations based on the debug versions of the new/delete operators provided by MFC (i.e. the DEBUG_NEW should be defined at the beginning of the source files). The better memory crashing testes can be done with the Rational’s Purify software even trial version.
|
|
Suhai Gyorgy
|
Mar 2, 2007 - 9:04 AM
|
I tested further(I turned on debugging in Release version). When debugging at the time of crash, Call stack shows: myApp.exe!CExtHookSink::HookChains_t::HookChainsWindowProc() + 0x167 C++ myApp.exe!CExtHookSink::HookChains_t::g_HookWndProc() + 0x7b C++ user32.dll!77d48734() user32.dll!77d48816() user32.dll!77d4b4c0() user32.dll!77d4b50c() ntdll.dll!7c90eae3() user32.dll!77d4daf6() myApp.exe!CWnd::DestroyWindow() Line 989 C++ myApp.exe!CMainFrame::DestroyWindow() Line 527 C++
So as I suspected, crash happens somewhere inside your piece of code. Please, check this issue!
|
|
Sergiy Lavrynenko
|
Mar 2, 2007 - 11:00 AM
|
Dear Chris,
I have tried to re-produce the crash by debugging the SDI sample application. I have stepped through the sub-tree of functions invoked from the CExtHookSink::HookChains_t::HookChainsWindowProc() method and tried to setup all the local variables to NULL values but I failed to re-produce exactly the same Call Stack window content like in your message.
Please let me know the following details:
1) Whether the customizable toolbars and menus are used in the crashed application (I guess - yes).
2) Whether any kind if APIs which can track their own message loops are invoked at shutdown (any kind of cross-thread/cross-process COM interface invocations).
I guess there is something exist in your application what makes the de-initialization sequence of window hooks not exactly corresponding to the their installation sequence (in the inversed order) and some of CExtHookSink -based objects become destroyed/deleted earlier than expected. If my guess is correct, then putting the following code into the beginning of CMainFrame::DestroyWindow() method will fix the problem:
// this line is needed if the CMainFrame class is derived from the CExtCustomizeSite class
CExtCustomizeSite::RemoveAllWndHooks();
// this line will preliminary remove menu bar’s hooks
m_wndMenuBar.RemoveAllWndHooks();
|
|
Suhai Gyorgy
|
Mar 5, 2007 - 2:13 AM
|
1) No, we are not using your customization subsystem. 2) In CMainFrame::DestroyWindow, we call CExtControlBar::ProfileBarStateSave; g_CmdManager->ProfileWndRemove; save two values in registry with the usual ::RegCreateKeyEx, ::RegSetValueEx, etc. APIs; kill a timer with CWnd::KillTimer and clear the clipboard with the following code: COleDataObject oDataObject;
if (oDataObject.AttachClipboard() && oDataObject.IsDataAvailable(ourClipboardFmt))
::OleSetClipboard(NULL);
Thats all. But m_wndMenuBar.RemoveAllWndHooks(); seems to solve our problem, no crash when that call is included right before calling CFrameWnd::DestroyWindow() at the end of CMainFrame::DestroyWindow. Even though, I still don’t know what CExtHookSink-based object could have caused the crash.
|
|
Technical Support
|
Mar 5, 2007 - 11:58 AM
|
The Win32 APIs can pass hook calls during their invocations. But unfortunately we cannot find out which hook sink object is destroyed in the incorrect moment because its run-time type information in invalid and unavailable. Hook sinks are used by menu bar, MDI tabs, tab page containers, window non-client area skinning subsystem, some common controls, customize site and dynamic bar site. Even of two items of these list are used in your project, it is hardly possible to detect which of them is destroyed incorrectly. The only solution we see is to switch to using thread hooks in Prof-UIS.
|
|
Suhai Gyorgy
|
Mar 7, 2007 - 2:30 AM
|
We are only using the menu bar and some common controls from the above list. How could we switch to using thread hooks in Prof-UIS?
|
|
Technical Support
|
Mar 7, 2007 - 6:15 AM
|
You should not do anything special to switch to using thread hooks. We will implement this in Prof-UIS in one of the next releases. We recommend you use the current solution when you remove the menu bar’s hook explicitly
|
|
Jia Hong Li
|
Mar 1, 2007 - 8:40 PM
|
I dock a toolbar in the bottom of Mainframe[ in function of CMainFrame::OnCreate() ], so I can initial my application with docking that toolbar in the botom.
My problem: After I hide that toolbar by any click event, I can’t start my application with default toolbar by rebuild [it is hidden from last time use] In other words, first time I start my application and I see the toolbar in the bottom, then after I hidden the toolbar, I can’t see the toolbar anymore in initial time
How could I do ? I just need to see the default window behavior designed by programmer.
Thank for help.
|
|
Jia Hong Li
|
Mar 1, 2007 - 8:48 PM
|
PS: I can use other method to reach my need, that is, 1. comment the g_CmdManager->SerializeState() and if( !CExtControlBar::ProfileBarStateLoad ... ). 2. build and run, then get a terrible look interface. 3. uncomment what I comment in step 1. 4. build and run, the I can get the "default window behavior" in initial time. But this is not a good idea. How could I do ?
|
|
Suhai Gyorgy
|
Mar 2, 2007 - 5:08 AM
|
g_CmdManager->SerializeState() saves and loads the command usage statistics, so you only need to use that in OnCreate and DestroyWindow if your menu is expanding (initially hides rarely used items (RUI)) or displays RUI in different style.
If you want to keep one of your toolbars (let’s call it m_wndToolBarPersistent) visible and docked to the bottom every time your application is started, your docking code in OnCreate should look like this: if( !CExtControlBar::ProfileBarStateLoad(
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP
)
)
{
DockControlBar( &m_wndMenuBar );
... // dock all controlbars and toolbars you have, except for m_wndToolBarPersistent
}
DockControlBar(&m_wndToolBarPersistent, AFX_IDW_DOCKBAR_BOTTOM);
CExtControlBar::ProfileBarStateSave in DestroyWindow saves all controlbars’, menubar’s and toolbars’ location to the registry, and CExtControlBar::ProfileBarStateLoad loads them in OnCreate. The terrible look interface you mentioned probably came from a previous state saved to the registry, but little messed up. If you clear these saved states from the registry, and start running your application, everything should be fine now. And you can assume that end-users won’t have anything about your application in their registry, when they use your application for the first time. Another solution would be to prevent the users from modifying your toolbar’s state altogether (keep users from closing it or make it floating).
|
|