CMDIFrameWndEx::EnablePaneMenu

Enables or disables automatic creation and management of the pop-up pane menu, which displays a list of application panes.

void EnablePaneMenu(
   BOOL bEnable,
   UINT uiCustomizeCmd,
   const CString& strCustomizeLabel,
   UINT uiViewToolbarsMenuEntryID,
   BOOL bContextMenuShowsToolbarsOnly=FALSE,
   BOOL bViewMenuShowsToolbarsOnly=FALSE 
);

Parameters

  • [in] bEnable
    If TRUE, automatic handling of the pane menu is enabled; if FALSE, automatic handling is disabled.

  • [in] uiCustomizeCmd
    Command ID of the Customize menu item. This menu item is usually added to the end of the list of panes.

  • [in] strCustomizeLabel
    The text to be displayed for the Customize menu item (for localization).

  • [in] uiViewToolbarsMenuEntryID
    Specifies the ID of a toolbar menu item that opens the pane menu. Usually this is the Toolbars submenu of the View menu.

  • [in] bContextMenuShowsToolbarsOnly
    If TRUE, the pane menu displays only a list of toolbars. If FALSE, the menu displays a list of toolbars and docking bars.

  • [in] bViewMenuShowsToolbarsOnly
    If TRUE, the pane menu displays only a list of toolbars. If FALSE, the menu displays a list of toolbars and docking bars.

Remarks

The pop-up pane menu displays the list of the application's panes and lets the user show or hide individual panes.

Example

The following example shows how EnablePaneMenu is used in the VisualStudioDemo Sample: MFC Visual Studio Application.

    // Enable pane context menu(list of bars + customize command):
    EnablePaneMenu( TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."), ID_VIEW_TOOLBARS, FALSE, TRUE);

Requirements

Header: afxMDIFrameWndEx.h

See Also

Reference

CMDIFrameWndEx Class

Hierarchy Chart