This document is archived and information here might be outdated. Recommended version. |
Provides access to the contents of the command pool. Note: the ICommandPool interface has been superseded byICommandPool2. Please consider using the more recent version.
The ICommandPool interface is used to access the collection of commands used by the ToolbarControl or a ToolbarMenu or ToolbarPalette, or the commands shared between several ToolbarControl's. The ToolbarControl manages its CommandPool itself in order to maintain its command items. If a ToolbarMenu or ToolbarPalette are added to a ToolbarControl they will automatically share the same CommandPool as the ToolbarControl. If a ToolbarMenu or ToolbarPalette are used standalone they will mange their own CommandPool.
Name | Description | |
---|---|---|
Command | The command at the given index. | |
Count | The number of commands in the command pool. | |
Created | Indicates if the commands OnCreate method has been called. | |
Exists | Indicates if the given command exists in the command pool. | |
FindByUID | Searches the command pool for the given UID. Returns matching command if the UID is found or nothing. | |
UID | The UID of the given command. May return nothing. | |
UsageCount | The number of items using the given command. |
CoClasses and Classes | Description |
---|---|
CommandPool | A collection of commands used by the ToolbarControl. |
Use the CommandPool to determine if a particular Command Exists, and to then retrieve its UsageCount, UID and Created properties. The Created property indicates whether the ICommand::OnCreate method has been called. Alternatively, iterate the contents of the CommandPool by using the Count and Command properties or the FindByUID method.