BCGControlBar Pro for MFC
CBCGPContextMenuManager

Detailed Description

The CBCGPContextMenuManager object manages context menus. You don't have to instantiate this objects in your application explicitly, but it's advised to call CBCGPWorkspace::InitContextMenuManager during initialization stage.

This object allows to centralize all the context menu management in one central place and give the context menus a "consistent" BCGControlBar look & feel. A context menu may be created at runtime by calling AddMenu and showed by calling ShowPopupMenu().

The CBCGPContextMenuManager object is able to load/save its state from/to registry. Therefore you can create a context menus at runtime, than save the menus in the registry and the menu's state will be restored at the next time application start.

See also
CBCGPWorkspace

Inherits CObject.

Public Member Functions

 CBCGPContextMenuManagerConstructs a CBCGPContextMenuManager object
 
 AddMenuAdds a new context menu
 
 AddMenuAdds a new context menu
 
 GetMenuByIdGiven a menu resource ID returns a handle to this menu.
 
 GetMenuByNameReturns a handle to menu when given a menu name
 
 GetMenuNamesRetrieves a list of menu names
 
 LoadStateLoads menus from the Windows registry
 
 SaveStateSaves context menus to the Windows registry
 
 ShowPopupMenuDisplays a popup menu
 
 ShowPopupMenuDisplays a popup menu
 
 TrackPopupMenuDisplays a shortcut menu at the specified location and tracks the selection of items on the menu.