This topic has not yet been rated - Rate this topic

CFrameWnd::GetMenuBarVisibility

Indicates whether the default state of the menu in the current MFC application is hidden or visible.

virtual DWORD CFrameWnd::GetMenuBarVisibility();

This method returns one of the following values:

  • AFX_MBV_KEEPVISIBLE (0x01) - The menu is displayed at all times, and by default does not have the focus.

  • AFX_MBV_DISPLAYONFOCUS (0x02) - The menu is hidden by default. If the menu is hidden, press the ALT key to display the menu and give it the focus. If the menu is displayed, press the ALT or ESC key to hide it.

  • AFX_MBV_ DISPLAYONFOCUS (0x02) | AFX_MBV_DISPLAYONF10 (0x04) (bitwise combination (OR)) - The menu is hidden by default. If the menu is hidden, press the F10 key to display the menu and give it the focus. If the menu is displayed, press the F10 key to toggle the focus on or off the menu. The menu is displayed until you press the ALT or ESC key to hide it.

If a runtime error occurs, this method asserts in Debug mode and raises an exception derived from the CException class.

Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.