This document is archived and information here might be outdated.  Recommended version.


IToolbarMenu.CommandPool Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

IToolbarMenu.CommandPool Property

The CommandPool used by the ToolbarMenu.

[Visual Basic .NET]
Public Property CommandPool As ICommandPool
[C#]
public ICommandPool CommandPool {get; set;}
[C++]
HRESULT get_CommandPool(
  ICommandPool** ppCommandPool
);
[C++]
HRESULT putref_CommandPool(
  ICommandPool* ppCommandPool
);
[C++]

Parameters ppCommandPool [out, retval]
ppCommandPool is a parameter of type ICommandPool ppCommandPool [in]
ppCommandPool is a parameter of type ICommandPool

Product Availability

Available with ArcGIS Engine.

Description

The CommandPool manages the collection of commands used by the ToolbarMenu. If the ToolbarMenu is added to the ToolbarControl the CommandPool will be shared with the IToolbarControl::CommandPool, otherwise a new CommandPool is created with a Hook property set to Nothing. If the ToolbarMenu is to be a popup menu, set the CommandPool to the  IToolbarControl::CommandPool in order to share CommandPools.

Errors Returned

1034 800a040a: The supplied command is invalid
1046 800A0416: The supplied command pool object is invalid

See Also

IToolbarMenu Interface

.NET Snippets

Add Editing Commands to ToolbarControl | Create PopUp ToolbarMenu

.NET Samples

Cut polygons without selection edit task (Code Files: EditingForm) | Custom reshape polyline edit task (Code Files: EditingForm) | Managing snap agents (Code Files: EditingForm) | Using HookActions in custom commands (Code Files: HookActions) | Custom vertex editing commands (Code Files: EditingForm) | Building a MapViewer application using the ArcGIS Engine controls (Code Files: MapViewer) | Edit event listener (Code Files: EditingForm) | Feature editing with the control commands (Code Files: FeatureEditing)

.NET Related Topics

How to add a context menu using the Visual Studio Integration tools