The command pool used by the ToolbarControl to manage command objects. The command pool object maybe shared with other ToolbarControls and ToolbarMenus.
[Visual Basic 6.0] Property CommandPool As ICommandPool
[Visual Basic .NET] Public Property CommandPool As ICommandPool
[C#] public ICommandPool CommandPool {get; set;}
[Java] public getCommandPool ( ICommandPool pVal )
[Java] public void setCommandPoolByRef( ICommandPool pVal ) throws IOException, AutomationException
[C++] HRESULT get_CommandPool( ICommandPool** pVal );
[C++] HRESULT putref_CommandPool( ICommandPool* pVal);
Parameters
pVal [out, retval]
pVal is a parameter of type ICommandPool
pVal [in]
pVal is a parameter of type ICommandPool
The CommandPool manages the collection of commands used by the ToolbarControl. The AddItem, AddToolbarDef, Remove and RemoveAll methods all use the CommandPool.
Care must be taken by developers when using the CommandPool to ensure that the ICommandPool::UsageCount of any commands in the collection stay synchronised with the number of item's using the command as the IToolbarItem::Command.
Note that if a new CommandPool is set commands are copied from the original CommandPool into the new one. If the same command exists in the original CommadPool and the new CommandPool, the command in the new CommandPool is used.
1034 800a040a: The supplied command is invalid
1046 800A0416: The supplied command pool object is invalid