The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.



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