This document is archived and information here might be outdated. Recommended version. |
Provides access to members that control the command pool.
The ICommandPoolEdit interface is used to manage the collection of commands used by the ToolbarControl, a ToolbarMenu, a ToolbarPalette, or the commands shared between several ToolbarControl's. Use the ICommandPoolEdit interface to add and remove commands in the CommandPool and to call the ICommand::OnCreate method.
Name | Description | |
---|---|---|
AddCommand | Adds the specified command to the command pool. If the command already exists its usage count incremented by 1. | |
AddUID | Adds the given UID to the command pool and returns an array of command objects. | |
CallOnCreate | Calls the specified command OnCreate method if the Hook is set and OnCreate has not already been called. | |
Hook | The object that is passed as a hook to the OnCreate method on the command. | |
Remove | Decrements the usage count of the command. If this reaches zero the command is removed from the command pool. | |
RemoveAll | Removes all commands from the command pool, regardless of each commands usage count. | |
SetHook | Sets the object that is passed as a hook to the OnCreate method on the command. |
Classes | Description |
---|---|
CommandPool | A collection of commands used by the ToolbarControl. |
The ICommandPoolEdit methods are normally called by the ToolbarControl, ToolbarMenu and ToolbarPalette objects to mange the command's used by their items. Typically, the Hook property will be set to a ToolbarControl. The ToolbarControl will ensure that the CallOnCreate method is called on the first IToolbarControl::Update, once the IToolbarControl::Buddy property has been set.