IVsProfferCommands4::AddCommandBarControl Method (String^, Object^, UInt32, UInt32, Object^)
Visual Studio 2015
Adds a control to a command bar.
Assembly: Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.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 location at which to place the control.
- dwCmdType
-
Type:
System::UInt32
[in] A value from the vsCommandBarType enumeration.
- ppCmdBarCtrl
-
Type:
System::Object^
[out] The newly added control.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Show: