|
|
|
|
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 |
|
zhang mingjie
|
Feb 23, 2005 - 12:17 AM
|
I add a formview into ResizeControlBar, there is a button control in the formview. It will send a message to mainfraim for closing current ResizeControlBar when I click button. when mainfraim receive the message, it will trigger the code like bellowing: ::ShowWindow(m_wndResizableBar, SW_HIDE ); But after that, there will be a small rectangle in the scream, I don’t know how to handle this bug, In addition, when I use the code ::ShowWindow(m_wndResizableBar, SW_SHOWNOACTIVATE );for displaying the ResizeControlBar, when I click the X buuton, I trigger the aboving code ,the ResizeControlBar will be showed again.
|
|
Technical Support
|
Feb 23, 2005 - 2:12 AM
|
You cannot use ShowWindow() directly for the control bar. Please use the CFrameWnd::ShowControlBar() method instead. To hide any resizable control bar (pBar ), which can be docked and floating, the code below may be used:#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pBar->AutoHideModeGet() )
pBar->AutoHideModeSet( false, false, true, true );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
ASSERT_VALID( pBar->m_pDockSite );
pBar->m_pDockSite->ShowControlBar( pBar, FALSE, FALSE );
and to show it, use:#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pBar->AutoHideModeGet() )
pBar->AutoHideModeSet( false, false, true, true );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
ASSERT_VALID( pBar->m_pDockSite );
pBar->m_pDockSite->ShowControlBar( pBar, TRUE, FALSE );
|
|