CFrameWnd::GetMenuBarVisibility

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

virtual DWORD CFrameWnd::GetMenuBarVisibility();

Return Value

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.

Remarks

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

Requirements

Header: afxwin.h

See Also

Reference

CFrameWnd Class

Hierarchy Chart

CFrameWnd::SetMenuBarVisibility

Other Resources

CFrameWnd Members