IVsProfferCommands3::AddCommandBarControl Method (String^, Object^, UInt32, UInt32, Object^)

 

Adds a control to a command bar.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int AddCommandBarControl(
	String^ pszCmdNameCanonical,
	Object^ pCmdBarParent,
	unsigned int dwIndex,
	unsigned int dwCmdType,
	[OutAttribute] Object^% ppCmdBarCtrl
)

Parameters

pszCmdNameCanonical
Type: System::String^

[in] The fully-qualified (canonical) name of the control to add.

pCmdBarParent
Type: System::Object^

[in] The parent command bar.

dwIndex
Type: System::UInt32

[in] The index of the position to place the control.

dwCmdType
Type: System::UInt32

[in] A value from the vsCommandBarType enumeration.

ppCmdBarCtrl
Type: System::Object^

[out] The new control.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Return to top
Show: