Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » How do I programatically hide the menu bar and keep it from coming back when switching apps Collapse All
Subject Author Date
Kevin Eshbach Jul 14, 2008 - 4:00 PM

Can you tell me what function I need to use programatically to get the menu bar to automatically hide itself when docked or floating?  Also, after hiding the menu bar I need to not have itself magically appear when I switch to another application and come back to it.  How do I turn off this behavior?


 


Kevin Eshbach

Technical Support Jul 15, 2008 - 11:17 AM

The CExtMenuControlBar::TranslateMainFrameMessage() method shows menu bar automatically when the VK_MENU key is pressed (ALT key). You can modify the CMainFrame::PreTranslateMessage() method in your project and not invoke menu bar’s CExtMenuControlBar::TranslateMainFrameMessage() method for WM_KEY*** messages when the main frame window is not active. You also can handle the WM_ACTIVATE message in your main frame class and show or hide menu bar depending on the acitve state of the main frame window. Please note, if your main frame class is based on the CExtNCW template class, then the WM_ACTIVATE message should be handled in the WindowProc virtual method.