Subject |
Author |
Date |
|
Alastair Watts
|
Jul 17, 2012 - 3:32 AM
|
The following code sometimes draws the scroll bar when the content does not exceed the window. Then when moving the mouse pointer over the scroll bar the area under the mouse is drawn correctly, leaving a partially drawn scroll bar!
bool CNavCtrl::OnGbwAnalyzeCellMouseClickEvent(UINT nChar,UINT nRepCnt, UINT nFlags, CPoint point) { bool bRet = CExtTreeGridWnd::OnGbwAnalyzeCellMouseClickEvent(nChar, nRepCnt, nFlags, point);
CExtGridHitTestInfo htInfo(point); HitTest(htInfo, false, true); if(htInfo.m_dwAreaFlags & __EGBWA_INNER_CELLS) { if(nChar == VK_LBUTTON) { if(htInfo.m_nRowNo) { HTREEITEM hti = ItemGetByVisibleRowIndex(htInfo.m_nRowNo); if(ItemGetParent(hti) == ItemGetRoot()) { ItemExpand(hti); return true; } } } }
return bRet; }
|
|
Alastair Watts
|
Aug 15, 2012 - 4:49 AM
|
|
|
Alastair Watts
|
Aug 9, 2012 - 12:17 AM
|
|
|
Alastair Watts
|
Jul 30, 2012 - 9:24 AM
|
Just got back from Paris ... test project now sent.
|
|
Technical Support
|
Jul 20, 2012 - 4:23 AM
|
Still didn’t receive any e-mail from you.
|
|
Alastair Watts
|
Jul 17, 2012 - 3:14 PM
|
I’ve tried that and it doesn’t fix it ... I’ll send a sample project.
|
|
Technical Support
|
Jul 17, 2012 - 1:42 PM
|
The code snippet in your message didn’t help us to reproduce the problem. You can invoke OnSwUpdateScrollBars(); before return true; to fix this problem.
|
|
Andreas Spachtholz
|
Jul 2, 2012 - 2:54 AM
|
Hi,
we have a big problem with the CExtToolControlBar. If the CExtToolControlBar is in Autohide MOde, and the content of the MDI View is repainted, the content of CExtToolControlBar is overpainted by the MDI View partially. The CExtToolControlBar is not really usable in this situation.
How can we overcome this problem?
Thanks.
BR, Andreas
|
|
Technical Support
|
Jul 5, 2012 - 6:13 AM
|
Please check all the windows discussed in your message were created with WS_CLIPCHILDREN|WS_CLIPSIBLINGS standard styles: MDI child frame window and view windows(s) inside it, window(s) inside resizable control bar which you switch to auto-hidden state.
|
|
Wilhelm Falkner
|
Jun 25, 2012 - 11:06 AM
|
Dear support team, Your last post is now 4 weeks old. Do You stop support? What happens to You? There are so much open Posts - no answer from You? Look, all posts in this forum are from customers from You, customers, they spend money and time in working with Your product, They all have a support contract with you - but no answer any more from your side. I’m working with ProfUis now for about 8 years, but when I do not get any support from Your side, I really have to search for alternatives, e.g. BCGSoft. I would like to stay with ProfUis, but then I need the support. And, I’m sure, most of Your customers think like me. W.Falkner
|
|
Piotr Tracz
|
Sep 4, 2012 - 4:10 AM
|
Is there anything, we ProfUIS users/customers should worry about?
|
|
Technical Support
|
Jul 10, 2012 - 11:06 AM
|
We found this question not answered earlier: MDI Tabs make non-client area of MDI client window zero width/height. One Note style tabs reserve some border and draw it using the current tab color. The scroll bars are part of this non-client area. So, Prof-UIS does not let these scroll bars to appear. This is a detail of implementation. You can see how it’s coded in the CExtTMWI::OnHookWndMsg() virtual method. If you love your scroll bars and cannot live without scrolling 4000 pixels, you can create an MDI-tabs class and put the following overridden method into it:
virtual bool OnHookWndMsg(
LRESULT & lResult,
HWND hWndHooked,
UINT nMessage,
WPARAM & wParam,
LPARAM & lParam
)
{
__PROF_UIS_MANAGE_STATE;
if( nMessage == WM_NCPAINT || nMessage == WM_NCCALCSIZE || nMessage == WM_WINDOWPOSCHANGING )
return false;
return
CExtHookSink::OnHookWndMsg(
lResult,
hWndHooked,
nMessage,
wParam,
lParam
);
}
|
|
Wilhelm Falkner
|
Jul 16, 2012 - 3:19 AM
|
Thanks, this solve our problem
|
|
Technical Support
|
Jul 5, 2012 - 10:37 AM
|
We are really sorry for the delay with answering some recent posts. We continue to provide technical support. If you have any questions, please let us know.
|
|
Wilhelm Falkner
|
Jul 10, 2012 - 5:47 AM
|
You are really sorry?If we have questions, we should let You know? How would it be, if You first answer the still open questions. If You solve the open problems?
|
|
Wilhelm Falkner
|
Jul 16, 2012 - 3:11 AM
|
|
|
Wilhelm Falkner
|
May 31, 2012 - 11:42 AM
|
Hi, what can cause nodes to become inactive on left pane of BSV? To make the question more clear: All nodes, that have an Icon and a direct Cmd are active and working. All nodes, that has to do some action in BSV, e.g. show an new pane, are inactive. Also when I click on them by mouse, they do not come highlighted. If I take a look at the content, created with OnRcgwGenerateContent, it seems (?) to be ok, at least I find my "subpanes" in it. When I call RcgwTreeItemSelectionDelay in one of them, the subpane is display right, but all elements at this page are inactive. What do I wrong? What can cause this behavior? Pls help TIA Willi
|
|
Wilhelm Falkner
|
Jul 19, 2012 - 4:13 AM
|
I have solved the problem: The bug is NOT in the HTML part, it is in BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) normal the last lines of this fuction has to be // otherwise, do default handling return CExtNCW < CMDIFrameWnd > :: OnCmdMsg( nID, nCode, pExtra, pHandlerInfo ); } But this code produce the bug. If I change it to // otherwise, do default handling CExtNCW < CMDIFrameWnd > :: OnCmdMsg( nID, nCode, pExtra, pHandlerInfo );
return TRUE;
} How should we users find this bug? NO hint in Your documentation, NO support from Your side 
|
|
Technical Support
|
Jul 5, 2012 - 10:12 AM
|
Backstage view content is HTML. The visibility of HTML parts is defined only by CSS properties and HTML element sizes. You can insert your backstage view content into the RibbonBar sample project and send it to us. This will let us check what’s wrong.
|
|
Wilhelm Falkner
|
May 29, 2012 - 10:30 AM
|
|
|
Wilhelm Falkner
|
Jul 16, 2012 - 3:09 AM
|
|
|
Technical Support
|
Jul 20, 2012 - 4:22 AM
|
Please copy VS 2010 libraries from your development computer into your test Windows XP computer to the same folder where your app is on XP. Here is where you can find the debug libraries: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\Debug_NonRedist\x86\ Here is where you can find release libraries: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\x86\
|
|
Wilhelm Falkner
|
Jul 20, 2012 - 7:31 AM
|
Copied the files into the app directory, also copied to system32 -> but bug is still existing Sorry, this do not help 
|
|
Technical Support
|
Jul 10, 2012 - 11:07 AM
|
Both Prof-UIS and MFC works stable with the default alignment. If you need to create a stable working application, please do not change the alignment. But you can code some parts of your app with a custom alignment. Please leave the UI code with the default alignment.
|
|
Technical Support
|
Jul 5, 2012 - 10:12 AM
|
We provide support for default structure member alignment only. If you need a custom alignment, then you should rebuild MFC, Prof-UIS and your projects with the same alignment.
|
|
Wilhelm Falkner
|
May 31, 2012 - 3:15 AM
|
Exact same happens with MBSC, Packetsize 8 byte, VS2010 (10.0)
|
|
Wilhelm Falkner
|
Jul 10, 2012 - 5:50 AM
|
If projects are to build with exact same alignement, the prog crash during startup. We have tried it with different aligments, different compilers, it is allways the same bug in ProfUis. Sorry, Your answer do not help
|
|
Wilhelm Falkner
|
May 24, 2012 - 11:00 AM
|
hi, when using CExtTabMdiWnd the minimize / maximize / Restore buttons are very often not displayed. It also happens, that they are displayed, if not needed (e.g. document is NOT maximized). Switching to other themes sometimes help, sometimes do not help. Pls help Another question: is it possible, to make the CExtTabMdiWnd a scrolled window? Like you do it in ::PreCreateWindow of MainFrame by setting cs.style to WS_VSCROLL and WS_HSCROLL? TIA Willi
|
|
Technical Support
|
May 28, 2012 - 11:30 AM
|
The CExtTabMdiWnd window is just a kind of CExtTabWnd window with automatic docking to MDI frame window sides and automatic tab item synchronization with list of currently created MDI child frame windows. You can show scrolling buttons for tab items using the __ETWS_SHOW_BTN_SCROLL_HOME | __ETWS_SHOW_BTN_SCROLL_END styles of the CExtTabWnd window and the CExtTabWnd::ModifyTabWndStyle() method.
|
|
Wilhelm Falkner
|
May 29, 2012 - 3:28 AM
|
Sorry, that was not my question. Your solution shows the scroll buttons for the tabs. I want to have that possibility to have the background scrolled. E.g. you have a window open of size 4000 x 4000. To see lower and/or right part of window, I need scrolling functions. Without CExtTabMdiWndI get this feature by adding cs.style with WS_VSCROLL and WS_HSCROLL in PreCreateWindow of mainframe. when using CExtTabMdiWnd these scrollbars are missing. Hope you now understand my question. And what’s about the minimize/maximize/restore buttons when window ins maximized? TIA Willi
|
|
Bill Olson
|
May 15, 2012 - 10:21 PM
|
After waiting in vain for two weeks for a reply to my question about tooltip timing, I spent two days digging through the code and finally found how to change it. Along the way I found a bug. CExtPopupMenuTipWnd::Show() defaults the variable bNoDelay=false, that is checked twice in the function and if it is false, bQuickDelay is set to true. The checks should be if(bNoDelay), instead of if(!bNoDelay). This make the default delay 20 ms instead of 500 ms. And to change the default tooltip time delay, make the above fix and change ID_PERIOD_DELAY_SHOW_NORMAL. It is defined as 500, which is 500 ms. Unfortunately I’m beginning to think we’re on our own with Prof-UIS. This is a great package and customer support was great the last few years, but I haven’t seen any tech support answers in over 2 weeks. I tried sending e-mails to tech support which never got answered. I don’t know what happened, but I think we’re going to have to help each other now. Bill
|
|
Technical Support
|
Jul 5, 2012 - 10:45 AM
|
We are really sorry for not replying in time. You can still count on our help.
|
|
Wilhelm Falkner
|
May 12, 2012 - 10:26 AM
|
Hi, we are preparing a new version of our software. Starting with this new version, we wana give our customers the posibility to switch between different themes. So we have to modify our source code in this way: Use CExtResizableDialog instead oc CDialog, use for static text CExtLabel, ... include a DDX_Control for each element. All works fine, but this result in an unsuitable runtime behavior. Switching dialogs need so much time, build up terrible long time. Sometimes buttons has to be pressed twice, because the programm is not reacting in time. Example: loading a document need more than 4 seconds, with the old version less than 1 second. The programm is reaction l ike working with an old 286 :-( What do we wrong? How can we speed up execution time? TIA Willi
|
|
Technical Support
|
May 28, 2012 - 11:31 AM
|
Debug is an unlimited number of times slower. Especially Prof-UIS grids. We are using heavy assertions everywhere. This is needed for bug searching both in Prof-UIS and your apps. Release is 20% . . . 30% slower rather than 3 times like you wrote.
|
|
Wilhelm Falkner
|
May 29, 2012 - 10:09 AM
|
It is ok and no problem, when Debug need such a long time. But I’m talking about the Release Version. On some "slow" (I5) PCs, it need sometimes 3-4 sec to open a simply dialog. When running the old version without themes and resizeable dialogs, it need about half a second. Additional it not allways need such a long time, sometime it opens in time, sometimes it need 4 sec. Seems, the prog ist waiting for? What? idle? Waiting? PLS help Willi
|
|
Technical Support
|
May 16, 2012 - 2:59 AM
|
Please compare the performance of your app with some Prof-UIS sample app. If yours is slower, then we need to reproduce the performance problem of your app somehow to provide you with advices. Typically performance problems are brought by heavy timer processing code, a lot of timers are running, heavy thread idle state processing code, heavy command updating code. Please do not forget to invoke the SetAutoSubclassChildControls() API in constructors of the CExtResizableDialog -derived classes. This will subclass all the common controls with dynamic instances of Prof-UIS C++ classes. I.e. you will not need to add CExtLabel instance for each static manually. The same is related to combo boxes, buttons, check boxes, radio buttons, editors.
|
|
Wilhelm Falkner
|
May 21, 2012 - 10:29 AM
|
Comparing with the Your sample Apps is not real fair: in Your samples, You create 1,2 or 3 dialogs, not more. In the real world, I have to create 20 up to 40 dialogs. I’m also not sure, how to find out, where the runtime is wasted. Measuring the time to switch between dialogs is very hard. So my fisrt try is to find out, what code need a lot of time, in my try: Open an existing document, create all needed dialogs and display at screen. a) I started with only a very little Prof-UIS elements (old version): 1.1 sec b) replaced all CDialog with CExtResizableDialog: 1.8 sec c) For each element used CExtLabel, CExtEdit, ... (BUT NOT CExtComboBox): 3.6 sec d) like c) but now also used ( about 70) CExtComboBox: 5.7 sec So, it seems, that CExtComboBox needs so much time. Done a cross-check: e) No CExtResizableDialog, No CExtLabel, CExtEdit, only CExtComboBo: 2.6 sec From substrcatime time of c) from time of d) and adding base time of a) I would exspect a time of e) 3.7 sec. So, it seems to me, that ist is very important, how much Prof-UIS elements are called. And this is only an example, I have a lot of documents with lot of different dialogs. The time measurement was done during lod of document, without any timers running, no idle processing, omly very few command update code. Waht do I wrong? Where can I speed up? TIA Willi P.S. Tnx, I know the SetAutoSubclassChildControls API, but for finding out the time consumption, I do not use it. I have tried, I get exact same timeing, when using this function instead of declaring and calling by hand
|
|
Wilhelm Falkner
|
May 12, 2012 - 8:32 AM
|
Hi, on Windows XP the menu of CExtNCW < CFrameWnd > is missing, when working with CExtPaintManagerOffice2007xxx or above. When running same programm at Windows 7, it is ok. At XP the menu is not displayed, but can become visable by pressing "Alt". Also al painting inside the FrameWnd is mispositioned. Pls advise. TIA Willi
|
|
Wilhelm Falkner
|
May 29, 2012 - 1:39 AM
|
<html> <body>
I use Prof-Uis 2.93, MBSC Build, packing size 1 Byte. Here XP - without Menu: 
And working ok, W7 with menu: 
TIA Willi </body> </html>
|
|
Technical Support
|
May 28, 2012 - 11:32 AM
|
We cannot reproduce this. Which Prof-UIS build configuration did you use in your tests? Could you send us a screen shot demonstrating the problem with caption on Windows XP?
|
|
Technical Support
|
May 16, 2012 - 2:59 AM
|
How to reproduce this using Prof-UIS sample apps? Could you please modify any of sample apps to make it hiding its menus on XP and send it to us?
|
|
Wilhelm Falkner
|
May 21, 2012 - 8:38 AM
|
|
|
Wilhelm Falkner
|
May 12, 2012 - 8:21 AM
|
Hi, when real working with BackstageView, the programm is crashing in CExtRichContentScrollWnd::OnRcsAnalyzeMouseClickEvent (Line 10536 of ExtScrollWnd.cpp V2.93). This happens when doning a real action. e.g. having a command "Open File". When opening the file, the crash happens. It crash, if I make the BSV invisable or not. What I tried is to modify Your code by checking again, if _ht_item.m_pRCI is valid. But I’m not sure, if this is the right solution. Can You please advise? TIA Willi
|
|
Technical Support
|
May 23, 2012 - 11:45 AM
|
We reproduced this issue. Thank you. To fix it please update the source code for the following method:
bool CExtRichContentScrollWnd::OnRcsAnalyzeMouseClickEvent(
UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
UINT nFlags, // mouse event flags
CPoint point // mouse pointer in client coordinates
)
{
ASSERT_VALID( this );
if( m_nMouseActivateCode == MA_ACTIVATE && ::GetFocus() != m_hWnd )
SetFocus();
CExtRichContentLayout * pRCL = RcsLayoutGet();
CExtRichContentItem * pRootRCI = ( pRCL->m_listHeap.GetCount() > 0 ) ? pRCL->m_listHeap.GetHead() : NULL;
if( pRootRCI == NULL )
return true;
if( nChar != VK_LBUTTON )
return true;
CExtRichContentHitTestInfo htInfoPressed( point + OnSwGetScrollPos(), *pRCL );
htInfoPressed.HitTest();
if( nRepCnt == 1
&& htInfoPressed.m_listHtBranch.GetCount() > 0
&& ( ( htInfoPressed.m_listHtBranch.GetTail().m_dwHtFlags & (__ERCHT_ON_ANY_SCROLL_BAR|__ERCHT_ON_SB_DISABLED) ) != 0 )
)
{
OnRcsAnalyzeScrollBarMouseClickEvent( htInfoPressed );
return true;
}
bool bQuickReStyleMode = ( ( RcsGetStyle() & __EXT_RCS_QUICK_RESTYLE_MODE ) ) ? true : false;
bool bRecalcPassed = false;
// if( m_htInfoPressed == htInfoPressed )
// return true;
CList < CExtRichContentHitTestInfo::ht_item_t, CExtRichContentHitTestInfo::ht_item_t & > & _listHtBranch =
( nRepCnt == 1 ) ? htInfoPressed.m_listHtBranch : m_htInfoPressed.m_listHtBranch;
POSITION pos = _listHtBranch.GetHeadPosition();
bool bHaveElementsWithResetStyles = false;
CExtRichContentItem * pRCI_LastSupportingPressed = NULL;
CExtRichStyleDescription::pseudo_class_def_t statesFocusOnly;
statesFocusOnly.m_eynFocus = CExtRichStyleDescription::e_ui_yn_yes;
CExtRichStyleDescription::pseudo_class_def_t statesPressedOnly;
statesPressedOnly.m_eynPressed = CExtRichStyleDescription::e_ui_yn_yes;
CExtRichContentItem * pRCI_next_focus = NULL, * pResetStyleRCI;
for( pResetStyleRCI = NULL; pos != NULL; )
{
CExtRichContentHitTestInfo::ht_item_t & _ht_item = _listHtBranch.GetNext( pos );
__EXT_DEBUG_RICH_CONTENT_ASSERT( _ht_item.m_pRCI != NULL );
if( nRepCnt == 0 || nRepCnt == 2 )
{
_ht_item.m_pRCI->RciEvent_OnPressedLeave( nChar, nRepCnt, nFlags, m_htInfoPressed, htInfoPressed, m_hWnd );
_ht_item.m_pRCI->ResetElementStateInfo( statesPressedOnly, CExtRichStyleDescription::e_ui_yn_unspecified );
if( _ht_item.m_pRCI->HaveAffectedCssPseudoClasses( statesPressedOnly ) )
{
bHaveElementsWithResetStyles = true;
pResetStyleRCI = _ht_item.m_pRCI;
}
}
else if( nRepCnt == 1 )
{
_ht_item.m_pRCI->RciEvent_OnPressedEnter( nChar, nRepCnt, nFlags, m_htInfoPressed, htInfoPressed, m_hWnd );
_ht_item.m_pRCI->ResetElementStateInfo( statesPressedOnly, CExtRichStyleDescription::e_ui_yn_yes );
if( _ht_item.m_pRCI->HaveAffectedCssPseudoClasses( statesPressedOnly ) )
{
bHaveElementsWithResetStyles = true;
pResetStyleRCI = _ht_item.m_pRCI;
}
}
if( _ht_item.m_pRCI->HaveAffectedCssPseudoClasses( statesPressedOnly ) )
{
bHaveElementsWithResetStyles = true;
pRCI_LastSupportingPressed = _ht_item.m_pRCI;
pResetStyleRCI = _ht_item.m_pRCI;
}
if( _ht_item.m_pRCI->HaveAffectedCssPseudoClasses( statesFocusOnly ) )
pRCI_next_focus = _ht_item.m_pRCI;
} // for( pResetStyleRCI = NULL; pos != NULL; )
if( pResetStyleRCI != NULL )
OnRcsResetElementStyle( pResetStyleRCI );
if( bHaveElementsWithResetStyles )
OnSwInvalidate( m_bRedrawErase );
bool bRecalc = false;
if( nRepCnt == 0 || nRepCnt == 2 )
{
bRecalc = true;
m_bPressedTracking = false;
m_bProcessingCancelMode = true;
if( ::GetCapture() == m_hWnd )
::ReleaseCapture();
m_bProcessingCancelMode = false;
if( m_nVkPressed == nChar && pRCI_LastSupportingPressed != NULL && pRCI_LastSupportingPressed->CalcEffectiveRect().PtInRect( point ) )
{
POSITION pos = _listHtBranch.GetHeadPosition();
for( pResetStyleRCI = NULL; pos != NULL; )
{
CExtRichContentHitTestInfo::ht_item_t & _ht_item = _listHtBranch.GetNext( pos );
__EXT_DEBUG_RICH_CONTENT_ASSERT( _ht_item.m_pRCI != NULL );
HWND hWndOwn = m_hWnd;
bool bOwnWindowVisible_Old = ( ( ( ::__EXT_MFC_GetWindowLong( hWndOwn, GWL_STYLE ) ) & WS_VISIBLE ) != 0 ) ? true : false;
if( nRepCnt == 0 )
_ht_item.m_pRCI->RciEvent_OnClick( nChar, nFlags, m_htInfoPressed, htInfoPressed, m_hWnd );
else if( nRepCnt == 2 )
_ht_item.m_pRCI->RciEvent_OnDoubleClick( nChar, nFlags, m_htInfoPressed, htInfoPressed, m_hWnd );
if( ! ::IsWindow(hWndOwn) )
return true;
bool bOwnWindowVisible_New = ( ( ( ::__EXT_MFC_GetWindowLong( hWndOwn, GWL_STYLE ) ) & WS_VISIBLE ) != 0 ) ? true : false;
if( bOwnWindowVisible_Old != bOwnWindowVisible_New )
return true;
if( _ht_item.m_pRCI->HaveAffectedCssPseudoClasses( statesFocusOnly ) )
{
bHaveElementsWithResetStyles = true;
pResetStyleRCI = _ht_item.m_pRCI;
}
} // for( pResetStyleRCI = NULL; pos != NULL; )
if( pResetStyleRCI != NULL )
OnRcsResetElementStyle( pResetStyleRCI );
if( pRCI_next_focus != NULL && LPVOID(pRCI_next_focus) != LPVOID(m_pRCI_focus) )
{
bHaveElementsWithResetStyles = true;
#if (defined __EXT_RCS_WND_APPLY_HOVER_RESET_WORKAROUND__)
// BEGIN // temporarily solution, reset hovered state to avoid incorrect inheritance from parent element inside OnRcsResetElementStates()
if( ! m_htInfoHover.IsEmpty() )
{
m_htInfoHover.Empty();
CExtRichStyleDescription::pseudo_class_def_t statesHoverOnly;
statesHoverOnly.m_eynHover = CExtRichStyleDescription::e_ui_yn_yes;
OnRcsResetElementStates( pRootRCI, statesHoverOnly, CExtRichStyleDescription::e_ui_yn_unspecified );
}
// END // temporarily solution, reset hovered state to avoid incorrect inheritance from parent element inside OnRcsResetElementStates()
#endif // (defined __EXT_RCS_WND_APPLY_HOVER_RESET_WORKAROUND__)
CExtRichContentItem * pOldFocusRCI = m_pRCI_focus;
if( m_pRCI_focus != NULL )
{
m_pRCI_focus->RciEvent_OnFocusLeave( m_hWnd, pRCI_next_focus );
if( OnRcsResetElementStates( m_pRCI_focus, statesFocusOnly, CExtRichStyleDescription::e_ui_yn_unspecified ) )
bHaveElementsWithResetStyles = true;
}
m_pRCI_focus = pRCI_next_focus;
m_pRCI_focus->RciEvent_OnFocusEnter( m_hWnd, pOldFocusRCI );
OnSwInvalidate( m_bRedrawErase );
if( OnRcsResetElementStates( m_pRCI_focus, statesFocusOnly, CExtRichStyleDescription::e_ui_yn_yes ) )
bHaveElementsWithResetStyles = true;
bRecalcPassed = true;
if( ! bQuickReStyleMode )
{
RcsDelayRecalcLayout();
OnSwRecalcLayout( true );
}
} // if( pRCI_next_focus != NULL && LPVOID(pRCI_next_focus) != LPVOID(m_pRCI_focus) )
} // if( m_nVkPressed == nChar && pRCI_LastSupportingPressed != NULL && pRCI_LastSupportingPressed->CalcEffectiveRect().PtInRect( point ) )
OnRcsAnalyzeMouseMoveEvent( nFlags, point );
} // if( nRepCnt == 0 || nRepCnt == 2 )
else if( nRepCnt == 1 )
{
if( ! bHaveElementsWithResetStyles )
return true;
bRecalc = true;
m_bPressedTracking = true;
m_nVkPressed = nChar;
m_htInfoPressed = htInfoPressed;
if( htInfoPressed.IsEmpty() )
{
if( ::GetCapture() == m_hWnd )
::ReleaseCapture();
}
else
{
if( ::GetCapture() != m_hWnd )
::SetCapture( m_hWnd );
}
} // else if( nRepCnt == 1 )
if( bRecalc )
{
if( ! bQuickReStyleMode )
{
if( ! bRecalcPassed )
{
RcsDelayRecalcLayout();
OnSwRecalcLayout( true );
}
OnSwUpdateScrollBars();
}
OnSwInvalidate( m_bRedrawErase );
}
return true;
}
|
|
Wilhelm Falkner
|
May 23, 2012 - 12:36 PM
|
It now working  Many tanks for Your support Willi
|
|
Wilhelm Falkner
|
May 16, 2012 - 3:49 AM
|
In OnCmdMsg of my MainFrame I call for some Commands, invoked by BSV, the sequence: if ( ((nID == ID_FILE_OPEN) ||
(nID == ID_FILE_PRINT) ||
(nID == ID_FILE_PRINT_PREVIEW) || // Print page preview
((nID >= ID_FILE_MRU_FILE1) && (nID <= ID_FILE_MRU_FILE16)) || // Recent File open
((nID >= ID_BV_OPEN_ALL_TYPES) && (nID <= ID_BV_OPEN_EXTRA_LAST)) || // Open special Type of file
((nID >= ID_BV_NEW_DOC_00) && (nID <= (ID_BV_NEW_DOC_00 + (UINT)theApp.m_pSaveValues->m_templateListNew.GetCount() + 1))) // Create New
)
&& (nCode == CN_COMMAND) && (pExtra == NULL) ) {
if (m_wndRibbonBar.BackstageView_IsVisible()) {
m_wndRibbonBar.BackstageView_EnsureHidden();
} But the crash happend also, if I don’t call it. It also happens, if I close the BSV by clicking with the mouse
|
|
Technical Support
|
May 16, 2012 - 3:00 AM
|
You wrote "It crash, if I make the BSV invisable". Which code did you invoke for that and where?
|
|
Wilhelm Falkner
|
May 12, 2012 - 8:11 AM
|
Hi, where can I define/set the width of left-side pane of the Backstage? The problem is, when having longer texts/buttons/icons on the left-side pane it will be wrapped into 2 or more lines. Basicly no problem, but then the highlighting is not at the right position. You can test this very easily with applying longer texts at Your RibbonBarMDI_DocView sample. TIA Willi
|
|
Technical Support
|
May 16, 2012 - 3:01 AM
|
It’s the <code>bsv_top_level_menu</css> tag. Its width set to <code>8.5em</css> in the <code>CExtRibbonBackstageViewWnd::OnRcgwGenerateContent()</css> virtual method. You can override it and append re-defined widths for the <code>bsv_top_level_menu</css> tag by appending the new CSS block.
|
|
Wilhelm Falkner
|
May 21, 2012 - 8:57 AM
|
It’s working :-) Thanks Willi
|
|
Wilhelm Falkner
|
May 3, 2012 - 8:19 AM
|
Hello, in Your sample for the Backstageview, you have followimg links included: pData_DirectContent->m_strHtmlInner =
_T("<p style=\" margin-top:0.4em; \" >Application version: XXXX.XXXX.XXXX.XXXX (XX-bit)</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Additional Version and Copyright information.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Part of the XXXX XXXX XXXX XXXX (xxxx xxxx xxxx xxxx) product.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >©201X Company Name. All rights reserved.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Product Support Services.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Product ID: 1111-2222-3333-4444-5555-6666-7777</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Software License Terms.</a></p>\r\n")
; Can You pls tell me, you to make them work? E.g. opening explorer, got to HP? TIA Willi
|
|
Technical Support
|
May 28, 2012 - 11:29 AM
|
You can use pData->m_nItemType property. For instance, backstage view defines set of __BSVIT_*** item types for its elements. You can convert HTREEITEM hti item handle into CExtRichContentItem * HTML DOM node (the CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke() method does this):
CExtSafeString strID;
strID.Format( _T("%p"), LPVOID(hti) );
CExtRichContentItem * pRCI = pRCL->ElementByUiBindingSrcID( LPCTSTR(strID) );
if( pRCI != NULL )
{
. . .
Then you can use CExtRichContentItem class properties. I.e. m_strTextParsed , m_strTextEffective , m_strTagPV and others. You can also access tag properties and CSS parameters.
|
|
Wilhelm Falkner
|
May 29, 2012 - 3:54 AM
|
You are right, I get all this information, but I don’t see the Item, I have clicked on. Waht is missing? Maybe You can modify the starting example (RibbonBarMDI), lines pData_DirectContent->m_strHtmlInner =
_T("<p style=\" margin-top:0.4em; \" >Application version: XXXX.XXXX.XXXX.XXXX (XX-bit)</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Additional Version and Copyright information.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Part of the XXXX XXXX XXXX XXXX (xxxx xxxx xxxx xxxx) product.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >©201X Company Name. All rights reserved.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Product Support Services.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Product ID: 1111-2222-3333-4444-5555-6666-7777</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Software License Terms.</a></p>\r\n")
; in that way, that it open explorer an jumps to Your website? TIA Willi
|
|
Technical Support
|
May 16, 2012 - 3:14 AM
|
The CExtRibbonBackstageViewWnd::OnBsvItemInvokeCommand() virtual method allows you to handle invocations of most of elements in the backstage view. But the hyperlink is not a button like element of backstage view. So, a hyperlink click can be handled by overriding the CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke() virtual method.
|
|
Technical Support
|
May 16, 2012 - 3:02 AM
|
The CExtRibbonBackstageViewWnd::OnBsvItemInvokeCommand() virtual method allows you to handle invocations of most of elements in the backstage view. But the hyperlink is not a button like element of backstage view. So, a hyperlink click can be handled by overriding the CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke() virtual method.
|
|
Wilhelm Falkner
|
May 21, 2012 - 6:46 AM
|
You are right, OnRcgtdItemInvoke is called. But how can I detect, what the user has clicked? I tried to read it out from m_strHtmlInner, but this is allways empty, except for leftmost pane entries. What have I done: I have overwritten OnRcgtdItemInvok: bool CMyBackstageViewWnd::OnRcgtdItemInvoke( HTREEITEM hti, e_item_invoke_type eIIT )
{
{
ASSERT_VALID( this );
ASSERT( hti != NULL );
ASSERT( RcgtdItemIsPresent( hti ) );
CExtRichContentLayout * pRCL = RcsLayoutGet();
if( pRCL == NULL )
return CExtRichGenWnd::OnRcgtdItemInvoke( hti, eIIT );
CExtRichGenItemData * pData = (CExtRichGenItemData*)RcgtdItemDataGet( hti );
if( pData == NULL )
return CExtRichGenWnd::OnRcgtdItemInvoke( hti, eIIT );
if (!pData->m_strHtmlInner.IsEmpty())
TRACE("CMyBackstageViewWnd::OnRcgtdItemInvoke m_strHtmlInner = %s\n", pData->m_strHtmlInner);
if (pData->m_nItemType == __BSVIT_DIRECT_CONTENT) { // here I try to decode element, use has clicked on ...... // .................
return TRUE;
}
}
return CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke( hti, eIIT );
} What have I done wrong? What is missing ? TIA Willi
|
|
Bill Olson
|
May 1, 2012 - 7:22 PM
|
Searching your site, I see that you shortened the default tooltip trigger delay from 1s to 500ms. How would I go about changing this delay? I don’t see in the Prof-UIS source where this is set to begin with. It would be nice to set the delay for all controls. I tried accessing the m_wndToolTip for a control, but it’s a protected member. I could always change it to a public one and recompile, but I would have to set the timing for each control in my application independently and that’s going to be a pain. I was hoping there was an easier way. I also had a further question about adding the scroll to my control bar. I couldn’t get it to work. I posted some code late last week in that thread. I’m awaiting a reply. Thanks, Bill
|
|
Bill Olson
|
May 16, 2012 - 11:12 PM
|
I found m_nPeriodDelayShowNormal yesterday. I also found a bug in the code handling tooltips. It was always using the minimum delay instead of the normal delay. When I fixed that it worked more as expected. Bill
|
|
Technical Support
|
May 16, 2012 - 3:08 AM
|
Here is how to change it for most of controls and toolbars:
g_DefPopupMenuSite.GetTip()->m_nPeriodDelayShowNormal = 1000;
Here is how to change it for tje ribbon bar and ribbon page: wndRibbon.OnAdvancedPopupMenuTipWndGet()->m_nPeriodDelayShowNormal = 1000;
|
|
Bill Olson
|
Apr 25, 2012 - 2:34 AM
|
I have a control bar with a CExtResizableDialog attached. Under some conditions, the window may be too small to see everything on the bar at once. How do I create scroll bars for this control bar? I found a sample for TestScrollDialog that was posted for someone else with a little bit of a different question. You add m_wndScrollContainer in that example, but I’m not quite sure how to make that work with a dynamic control bar. Thanks, Bill
|
|
Bill Olson
|
May 16, 2012 - 11:09 PM
|
OK, I added an nDesiredCmdID to the BarAlloc call. I then get that ID with nCmdID = (UINT)m_pBarRight->GetDlgCtrlID(); That looks fine. Just before calling ShowControlBar, I make the call to m_wndScrollRight.Create with the nCmdID. I also tried it as the last command in OnCreate. I get through OnCreate, but when OnSize is called, the program crashes. I get an assert in void CExtControlBar::MaximizeOnRow() on line 11965 ASSERT( ::GetWindow( hWndChild, GW_HWNDNEXT ) == NULL ); hWndChild is non-zero, so it is getting initialized. The comment a few lines above says: // automatic child resizing - only one child is allowed Thanks, Bill
|
|
Technical Support
|
May 23, 2012 - 11:47 AM
|
This is a very important limitation: CExtControlBar windows (including CExtDynamicControlBar ) must contain one child window. This is important because bars switched into auto-hidden state or into dynamic tabbed/SDI/MDI document states are really just hidden bars and their single child windows are just temporarily moved into other containers implementing an auto-hide slider window or a document container window.
If you are using CExtNCSB -based window as a control bar child window, then you should invoke CExtNCSB constructor with both flag parameters set to true :
CYourClass::CYourClass( . . . )
: CExtNCSB < CBaseOfYourClass > ( true, true )
. . .
{
. . .
}
The first flag makes scroll bars initialization delayed. The second flag creates one container window between your window and its parent control bar window. The scroll bars are also created in this dynamic container window. As a result, the control bar contains one child window. We believe this is what you really need.
|
|
Technical Support
|
Apr 26, 2012 - 1:00 PM
|
Please create CExtScrollContainerWnd as a child of CExtControlBar . Then create a dialog inside CExtScrollContainerWnd .
|
|
Bill Olson
|
Apr 27, 2012 - 3:10 AM
|
I found something similar in the TabPages example, but I couldn’t get it to work in my code. My code is derrived from the Dynamic Inner and Outer Bar sample which uses CExtDynamicControlBar pointers. The TabPages sample doesn’t use pointers. I don’t know if that’s contributing to my problem or not.
My CMDIChildWnd derrived class has the following:
class CChildMyWnd : public CExtNCW < CMDIChildWnd >, public CExtDynamicBarSite
{
...
public:
CExtDynamicControlBar * m_pBarPersistentInner;
CExtDynamicControlBar *m_pBarRight;
CExtScrollContainerWnd m_wndScrollRight;
CDlgBarR m_DlgBarR;
...
};
Then in the OnCreate function:
...
CExtDynamicBarSite::Install( this );
...
strBarCaption.Format(_T("Control Window"));
//if(!m_BarRight.Create(strBarCaption, this, ID_STDTR_DLGBAR_RIGHT))
//{
// TRACE0("Failed to create m_BarRight\n");
// return -1;
//}
m_pBarRight = BarAlloc(strBarCaption,icon,0,NULL,true);
m_pBarRight->m_nMdiMenuResourceID = IDR_MyTYPE;
m_pBarRight->m_nMdiAccelTableResourceID = IDR_MAINFRAME;
if(!m_wndScrollRight.Create(m_pBarRight, rectDefault ))
{
TRACE0("Failed to create m_wndScrollRight\n");
return -1;
}
nCmdID = (UINT)m_pBarRight->GetDlgCtrlID();
pCmdItem = g_CmdManager->CmdGetPtr(pApp->m_pszProfileName,nCmdID);
ASSERT( pCmdItem != NULL );
pCmdItem->StateSetBasic();
if(!m_DlgBarStdR.CreateInsideBar(m_pBarRight))
{
ASSERT( FALSE );
return -1;
}
...
The CreateInsideBar call fails. Here is the code in my dialog
bool CDlgBarR::CreateInsideBar(CExtControlBar * pBar)
{
ASSERT_VALID( this );
ASSERT_VALID( pBar );
ASSERT( GetSafeHwnd() == NULL );
ASSERT( pBar->GetSafeHwnd() != NULL );
if( ! CExtResizableDialog::Create( IDD, pBar ) )
return false;
pBar->OnRepositionSingleChild(); //<------ ASSERTS in this call
return true;
}
The assert happens on the line (in CExtControlBar)
ASSERT(::GetWindow(hWndChild, GW_HWNDNEXT) == NULL);
Obviously the scroll bar is causing something to go awry down here, but I’m stumped about how. Unless I’m completely out to lunch... Bill
|
|
Technical Support
|
May 16, 2012 - 3:08 AM
|
The nDesiredCmdID parameter of the CExtDynamicBarSite::BarAlloc() allows you to specify a non-zero command identifier which you then can always use to get pointers to your bars and create bar child windows. I.e. bar child windows should be invoked after creating all bars or after loading bar states and dynamic bar site’s state.
|
|
Wilhelm Falkner
|
Apr 24, 2012 - 11:03 AM
|
Hello, I want to create a backstageview on the fly. In your samples this is done during creation, but I have to reflect changes, e.g. teh recent file list may have changed. So, what I have tried: - I have overwritten our function BackstageView_EnsureVisible. In this I do following: - I deleted the old Items with RcgtdItemRemoveAllChildren - I inserted my new items at the end of the function I call your BackstageView_EnsureVisible. Seems to work, no errors - but the window at screen is not updated. What do I miss, what do I have to do else? TIA Willi
|
|
Technical Support
|
Apr 26, 2012 - 1:01 PM
|
The CExtRichContentScrollWnd::RcsDelayRecalcLayout() method tells the backstage/HTML view to recompute the HTML layout before an upcoming painting.
|
|
Wilhelm Falkner
|
Apr 26, 2012 - 9:24 AM
|
Found it :-) have to add at end: OnRcgwGenerateContent and RcsTextSet
|
|
Michael Nitsche
|
Apr 19, 2012 - 9:28 AM
|
I would like to create a grid cell item that will be used in a property grid so I can instead of showing a drop down of enumerated types, show a drop down of custom drawn items that would illustrate the enumeration values. Should I inherit from the CExtGridCell class and is there a help topic on doing something like this?
Thanks in advance.
|
|
Technical Support
|
Apr 23, 2012 - 8:56 AM
|
|
|
Emmanuel V.
|
Apr 17, 2012 - 9:19 AM
|
Hi, Is it possible to set read-only all cells of a CExtGridWnd, without using ModifyStyle(__EGCS_READ_ONLY) for each cells ? I do not want to disable CExtGridWnd, I want it able to expand/scroll cells. Thanks.
|
|
Technical Support
|
Apr 23, 2012 - 9:08 AM
|
You can override the CExtGridWnd::OnGridCellInplaceControlCreate() virtual method. Your method should invoke parent class method and change the default cell editor in such a way that it is read only.
|
|
Oliver Rau
|
Apr 13, 2012 - 5:41 AM
|
Hello, is there a possibility to have a tree-Control inside the grid.
So I should work as the CExtGridCellCheckListComboBox, but the content of the popup window
is not a list, it should be a CExtTreeGridWnd. We want to display checkboxes in the tree so the behavior should be like the Checklistbox
(open until you click out of the window).
thanks in advance
|
|
Technical Support
|
Apr 17, 2012 - 4:41 AM
|
The Combo Box column in the Grid dialog page in the ProfUIS_Controls demonstrates popup list boxes with a tree like content. But it’s not a tree control based tree and there is no support for per-item check box there. Check boxes can be implemented as custom drawn list box items.
|
|
Darlene Gariepy
|
Apr 11, 2012 - 1:50 PM
|
We’ve found what looks like a bug. It can be reproduced with the following steps using your MDI_DynamicBars sample.
1. Launch the sample. We used Unicode DEBUG.
2. Remove all control bars from the document tab. The only thing that should be left in the document area is MDIDOC1.
3. Move the "Persistent Bar" to the document area (i.e. Select "Tabbed Document" from the bar’s menu).
4. Save the layout (i.e. *** Bar State Persistence *** -> Save resizable bar to file).
5. Repeat step 4.
In step 5, after the second attempt to save, a failed assertion will trigger in ExtControlBar.cpp, line 28285: ASSERT( m_listBarsInDocMode.Find( pBar ) != NULL ); We are using version 2.9.2.
|
|
Technical Support
|
Apr 23, 2012 - 9:04 AM
|
Thank you for additional information. To fix this issue, please update the source code for the following method:
bool CExtDynamicBarSite::StateSerialize(
CArchive & ar,
bool bEnableThrowExceptions // = false
)
{
ASSERT( this != NULL );
DWORD dwGeneralFlags = 0;
DWORD dwReserved = 0L;
try
{
if( ar.IsStoring() )
{
ar << dwGeneralFlags;
ar << dwReserved;
ar << dwReserved;
ar << dwReserved;
ar << dwReserved;
DWORD dwCount = (DWORD)BarEnumGetCount();
ar << dwCount;
POSITION pos;
for( pos = BarEnumGetStartPosition(); pos != NULL; )
{ // delayed rebuild of visible documents list after reloading
CExtDynamicControlBar * pBar = BarEnumGetNext( pos );
ASSERT_VALID( pBar );
POSITION posInListBarsInDocMode = m_listBarsInDocMode.Find( pBar );
bool bVisibleState = false;
if( pBar->BarStateGet( &bVisibleState ) == CExtDynamicControlBar::__EDBS_DOCUMENT )
{
if( bVisibleState )
{
if( posInListBarsInDocMode == NULL )
m_listBarsInDocMode.AddTail( pBar );
continue;
} // if( bVisibleState )
} // if( pBar->BarStateGet( &bVisibleState ) == CExtDynamicControlBar::__EDBS_DOCUMENT )
if( posInListBarsInDocMode != NULL )
m_listBarsInDocMode.RemoveAt( posInListBarsInDocMode );
} // delayed rebuild of visible documents list after reloading
for( pos = BarEnumGetStartPosition(); pos != NULL; )
{ // serialize per-bar dynamic properties
CExtDynamicControlBar * pBar = BarEnumGetNext( pos );
ASSERT_VALID( pBar );
bool bVisibleState = false;
if( pBar->BarStateGet( &bVisibleState ) == CExtDynamicControlBar::__EDBS_DOCUMENT )
{
if( bVisibleState )
{
ASSERT( m_listBarsInDocMode.Find( pBar ) != NULL );
continue;
} // if( bVisibleState )
} // if( pBar->BarStateGet( &bVisibleState ) == CExtDynamicControlBar::__EDBS_DOCUMENT )
ASSERT( m_listBarsInDocMode.Find( pBar ) == NULL );
UINT nCmdID = (UINT)pBar->GetDlgCtrlID();
ar << DWORD(nCmdID);
bool bPersistentBar = pBar->IsPersistentBar();
DWORD dwSerializeFlags = 0;
if( bPersistentBar )
dwSerializeFlags |= 0x01;
ar << dwSerializeFlags;
if( ! bPersistentBar )
{
CRuntimeClass * pRTC = pBar->GetRuntimeClass();
ASSERT( pRTC != NULL );
ar.WriteClass( pRTC );
} // if( ! bPersistentBar )
ar << pBar->m_strCaptionText;
pBar->m_icon.Serialize( ar );
pBar->OnSerializeDynamicProps( ar );
} // serialize per-bar dynamic properties
CTypedPtrList < CPtrList, CExtDynamicControlBar * > _listSerialize;
bool bUseDefaultOrder = true;
CExtDynamicBarSite::eDetectedUiType_t eDUIT = GetDetectedUiType();
eDUIT;
#if (!defined __EXT_MFC_NO_TABMDI_CTRL)
if( eDUIT == __EDUIT_MDI_WITH_TABS )
{ // detect MDI order using tabs
CExtTabWnd * pTabs = GetMdiTabs();
if( pTabs != NULL )
{
LONG nIndex, nCount = pTabs->ItemGetCount();
for( nIndex = 0L; nIndex < nCount; nIndex ++ )
{
HWND hWnd = (HWND)pTabs->ItemGet( nIndex )->LParamGet();
CWnd * pWndPremanent = CWnd::FromHandlePermanent( hWnd );
if( pWndPremanent == NULL )
continue;
CExtDynamicMDIChildWnd * pWndMdiChild = DYNAMIC_DOWNCAST( CExtDynamicMDIChildWnd, pWndPremanent );
if( pWndMdiChild == NULL )
continue;
if( pWndMdiChild->GetBarSite() != this )
continue;
CExtDynamicControlBar * pBar = pWndMdiChild->GetBar();
if( pBar == NULL )
continue;
if( m_listBarsInDocMode.Find( pBar ) == NULL )
continue;
_listSerialize.AddTail( pBar );
} // for( nIndex = 0L; nIndex < nCount; nIndex ++ )
if( _listSerialize.GetCount() == m_listBarsInDocMode.GetCount() )
bUseDefaultOrder = false;
else
_listSerialize.RemoveAll();
} // if( pTabs != NULL )
} // detect MDI order using tabs
#endif // (!defined __EXT_MFC_NO_TABMDI_CTRL)
#if (!defined __EXT_MFC_NO_TAB_PAGECONTAINER_CTRL)
if( eDUIT == __EDUIT_SDI_TAB_PAGE_CONTAINER )
{ // detect document mode order using SDI tab page container
CExtTabPageContainerWnd * pWndTabPageContainer = GetTabPageContainer();
if( pWndTabPageContainer->GetSafeHwnd() != NULL )
{
ASSERT_VALID( pWndTabPageContainer );
CTypedPtrList < CPtrList, CExtDynamicControlBar * > _listFound;
INT nIndex = 0, nCount = pWndTabPageContainer->PageGetCount();
for( nIndex = 0; nIndex < nCount; nIndex ++ )
{
HWND hWndPage = pWndTabPageContainer->PageHwndGetSafe( nIndex );
if( hWndPage == NULL )
continue;
CExtDynamicControlBar * pBar = BarFindByChildHWND( hWndPage );
if( pBar == NULL )
continue;
ASSERT_VALID( pBar );
#ifdef _DEBUG
bool bVisibleState = false;
ASSERT( pBar->BarStateGet( &bVisibleState ) == CExtDynamicControlBar::__EDBS_DOCUMENT );
ASSERT( bVisibleState );
#endif // _DEBUG
if( m_listBarsInDocMode.Find( pBar ) == NULL )
continue;
_listSerialize.AddTail( pBar );
}
if( _listSerialize.GetCount() == m_listBarsInDocMode.GetCount() )
bUseDefaultOrder = false;
else
_listSerialize.RemoveAll();
}
} // detect document mode order using SDI tab page container
#endif // (!defined __EXT_MFC_NO_TAB_PAGECONTAINER_CTRL)
if( bUseDefaultOrder )
_listSerialize.AddTail( &m_listBarsInDocMode );
for( pos = _listSerialize.GetTailPosition(); pos != NULL; )
{ // serialize per-bar dynamic properties
CExtDynamicControlBar * pBar = _listSerialize.GetPrev( pos );
ASSERT_VALID( pBar );
ASSERT( pBar->BarStateGet() == CExtDynamicControlBar::__EDBS_DOCUMENT );
UINT nCmdID = (UINT)pBar->GetDlgCtrlID();
ar << DWORD(nCmdID);
bool bPersistentBar = pBar->IsPersistentBar();
DWORD dwSerializeFlags = 0;
if( bPersistentBar )
dwSerializeFlags |= 0x01;
ar << dwSerializeFlags;
if( ! bPersistentBar )
{
CRuntimeClass * pRTC = pBar->GetRuntimeClass();
ASSERT( pRTC != NULL );
ar.WriteClass( pRTC );
} // if( ! bPersistentBar )
ar << pBar->m_strCaptionText;
pBar->m_icon.Serialize( ar );
pBar->OnSerializeDynamicProps( ar );
} // serialize per-bar dynamic properties
} // if( ar.IsStoring() )
else
{
ar >> dwGeneralFlags;
ar >> dwReserved;
ar >> dwReserved;
ar >> dwReserved;
ar >> dwReserved;
BarFreeAll( false, true );
m_listBarsInDocMode.RemoveAll();
ASSERT( BarEnumGetCount( false, true ) == 0 );
DWORD dwCount;
ar >> dwCount;
for( DWORD dwIndex = 0; dwIndex < dwCount; dwIndex++ )
{
UINT nCmdID;
DWORD dwTmp;
ar >> dwTmp;
nCmdID = UINT(dwTmp);
DWORD dwSerializeFlags;
ar >> dwSerializeFlags;
CExtDynamicControlBar * pBar = NULL;
if( (dwSerializeFlags & 0x01) != 0 )
{ // if serializing persistent bar
pBar = BarGetByCmdID( nCmdID );
if( pBar == NULL )
{
ASSERT( FALSE );
BarFreeAll( false, true );
#if _MFC_VER >= 0x0800
::AfxThrowArchiveException( CArchiveException::genericException );
#else
::AfxThrowArchiveException( CArchiveException::generic );
#endif
} // if( pBar == NULL )
ASSERT_VALID( pBar );
ar >> pBar->m_strCaptionText;
pBar->m_icon.Serialize( ar );
} // if serializing persistent bar
else
{ // if serializing dynamic bar
CRuntimeClass * pRTC = ar.ReadClass();
ASSERT( pRTC != NULL );
CExtSafeString strCaptionText;
ar >> strCaptionText;
CExtCmdIcon icon;
icon.Serialize( ar );
pBar =
BarAlloc(
strCaptionText,
icon,
nCmdID,
pRTC
);
if( pBar == NULL )
{
ASSERT( FALSE );
BarFreeAll( false, true );
#if _MFC_VER >= 0x0800
::AfxThrowArchiveException( CArchiveException::genericException );
#else
::AfxThrowArchiveException( CArchiveException::generic );
#endif
} // if( pBar == NULL )
} // if serializing dynamic bar
ASSERT_VALID( pBar );
pBar->OnSerializeDynamicProps( ar );
} // for( DWORD dwIndex = 0; dwIndex < dwCount; dwIndex++ )
ASSERT( ((DWORD)BarEnumGetCount()) == dwCount );
} // else from if( ar.IsStoring() )
return true;
} // try
catch( CException * pException )
{
if( bEnableThrowExceptions )
throw;
pException->Delete();
} // catch( CException * pException )
catch( ... )
{
if( bEnableThrowExceptions )
throw;
} // catch( ... )
dwGeneralFlags;
dwReserved;
return false;
}
|
|
Darlene Gariepy
|
Apr 17, 2012 - 8:18 AM
|
Try these alternate steps:
1. Delete the registry state (e.g. HKEY_CURRENT_USER\Software\Foss\MDI_DynamicBars).
2. Launch the app in debug.
3. Remove "Auto-Hide" from "Persistant Bar" (i.e. click on Pin button in bar title).
4. Right-click "Persistant Bar" title bar and choose "Tabbed Document".
5. Save the layout (i.e. *** Bar State Persistence *** -> Save resizable bar to file).
6. Load the layout from step 5.
7. Close the application.
|
|
Technical Support
|
Apr 17, 2012 - 4:37 AM
|
We cannot reproduce this issue. We assume step 2 is hiding bars or switching bars into docked state. Could you send us the state file you saved during your test?
|
|
Michael Nitsche
|
Apr 9, 2012 - 1:13 PM
|
When a user event occurs I want to tell the PropertyGrid to re-read all of the properties that are in the property store. Is there a way to do this?
|
|
Technical Support
|
Apr 17, 2012 - 4:39 AM
|
Please try CExtPropertyGridCtrl::PropertyStoreSynchronize() .
|