|
|
|
|
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 |
|
Saroj Acharya
|
Sep 7, 2004 - 11:03 AM
|
Hi, I have a requirement in my application where I do want to use CExtControlBar to display the dialog box and other controls on the screen but do not want them to: 1. Appear in the menu that appears on mouse right click. 2. Hide and show them from, a menu or tool bar. Any idea how to do that ? Thanks in advance. Saroj
|
|
Technical Support
|
Sep 8, 2004 - 10:26 AM
|
Dear Saroj,
Please set the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property of your resizable bar object to false . This is enough to hide its item in context menus. As for the menu bar, you may simply remove it from the menu resource but in this case you need to register this command item in the command manager manually.
|
|
Saroj Acharya
|
Sep 7, 2004 - 2:40 PM
|
I found your earlier post with an answer. Please ignore my question. The answer is below:
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pBar->AutoHideModeGet() ){
pBar->AutoHideModeSet( false, false, true, true );
CWnd* pWnd = GetDlgItem(IDC_STATIC);
if( pWnd != NULL )
pWnd->SendMessage(WM_CANCELMODE);
}
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
ShowControlBar( pBar, FALSE, FALSE );
Please note that the CFrameWnd::ShowControlBar() method is used. The CControlBar::ShowWindow() method is not suitable here because it does not affect positions of other bars in the same frame window (i.e., the method does not recalculate the frame layout).
|
|