BCGControlBar Pro for MFC
void CBCGPFrameWnd::EnableControlBarMenu ( BOOL  bEnable,
UINT  uiCustomizeCmd,
const CString &  strCustomizeLabel,
UINT  uiViewToolbarsMenuEntryID,
BOOL  bContextMenuShowsToolbarsOnly = FALSE,
BOOL  bViewMenuShowsToolbarsOnly = FALSE,
BOOL  bIncludeRebarPanes = FALSE 
)
inline

Enables or disables automatic handling of "control bar menu".

Starting version 8.5 the framework can automatically build, display and handle the "control bars menu" - the menu used to display the list of application's control bars, which can be shown or hidden by the user. In the previous version you had to provide this kind of menus (usually the application's context menu and the View | Toolbars menu) manually.

Use this function to enable automatic handling of control bar popup menus.

Parameters
bEnableIf TRUE, automatic handling of control bar popup menus will be enabled; if FALSE, automatic handling of control bar popup menus will be disabled.
uiCustomizeCmdCommand ID of "Customize..." menu item. This menu item is usually added to the end of the list of control bars.
strCustomizeLabelSpecifies the text to be displayed for the "Customize..." menu item (for localization).
uiViewToolbarsMenuEntryIDSpecifies the ID of a toolbar menu item, which opens the contol bar popup menu (usually View | Toolbars).
bContextMenuShowsToolbarsOnlyIf TRUE, the control bar context menu displays the list of toolbars only. If FALSE, the menu displays the list of toolbars and docking bars.
bViewMenuShowsToolbarsOnlyIf TRUE, the control bar menu (opened from the main menu) displays the list of toolbars only. If FALSE, the menu displays the list of toolbars and docking bars.
bIncludeRebarPanesIf TRUE, the control bar menu will include a list of rebar panes too.