ArcObjects Library Reference (Framework)  

CommandItem Class

Command Item.

CommandItem is a non-creatable object. References to non-creatable objects must be obtained through other objects.

Product Availability

Available with ArcGIS Desktop.

Description

A CommandItem class represents any item on a command bar. For example, buttons, tools, and menu items that appear on command bars are all command items. Use the Find method from either ICommandBars or ICommandBar to obtain a reference to a particular CommandItem.

Supported Platforms

Windows

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
ICommandItem Provides access to members that define a command item.
IPersist Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile.
IPersistStream (esriSystem)
ISupportErrorInfo Indicates whether a specific interface can return Automation error objects.