Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic


Sets the display state of the menu in the current MFC application to hidden or displayed.

virtual BOOL SetMenuBarState( 
    DWORD nState



[in] nState

Specifies whether to display or hide the menu. The nState parameter can have the following values:

  • AFX_MBS_VISIBLE (0x01) – Displays the menu if it is hidden, but has no effect if it is visible.

  • AFX_MBS_HIDDEN (0x02) – Hides the menu if it is visible, but has no effect if it is hidden.

true if this method successfully changes the menu state; otherwise, false.

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)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.