Command::AddControl Method (Object^, Int32)

 

Creates a persistent command bar control for the command.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Object^ AddControl(
	Object^ Owner,
	int Position = 1
)

Parameters

Owner
Type: System::Object^

Required. A CommandBar object to which the new command bar control is to be added.

Position
Type: System::Int32

Optional. The index position, starting at one, in the command bar to place the new control.

Return Value

Type: System::Object^

A CommandBarControl object.

The environment saves the control and its placement, making it available according to the command's ContextUIGUIDs when the contributing VSPackage is not loaded, or to its responses to the QueryStatus Method when it is loaded.

Return to top
Show: