BCGControlBar Pro for MFC

Detailed Description

The CBCGPUserTool class represents a user-defined tool. The user-defined tool is an external application or plug-in associated with a menu item. The user-defined tools are usually created during menu/toolbar customization process by the user. The framework-provided customization dialog has a special tab, which allows the user to specify the tool name, command line, arguments and initial directory.

If you plan to incorporate the user-defined tools into your application, you have to reserve a dummy menu item in the menu resource and assign an ID to this item. Pass this ID as the uiCmdToolsDummy parameter to the CBCGPWorkspace::EnableUserTools function along with the user-defined tools command ID range. You have to reserve these IDs as well. For example, if there are up to ten tools to be defined in the application, you need to reserve ten command IDs in the application resource file.

See also
CBCGPWorkspace, CBCGPUserToolsManager

Inherits CObject.

Public Member Functions

 DrawToolIconRenderer a tool image.
 
 GetCommandReturns a text string containing the user tool's command line.
 
 GetCommandIdReturns a command ID associated with the user tool's menu item.
 
 InvokeExecutes a command associated with the user tool.
 
 SetCommandAssociates a command with the user tool.
 
 SetToolIconLoads the new tool icon.
 
 SetToolLargeIconLoads the new tool icon (large).
 

Public Attributes

 m_strArgumentsSpecifies the user tool command's arguments.
 
 m_strInitialDirectorySpecifies the user tool command's initial directory.
 
 m_strLabelSpecifies the user tool's label to be displayed in the menu.
 

Static Public Attributes

 m_bDPIAwareIconSpecifies whether tool icons are DPI-aware. By default, this member is TRUE.
 

Protected Member Functions

 LoadDefaultIconCalled by the framework to load a user-defined tool icon, if the icon can't be loaded from the tool's executable.