IVsProfferCommands3.AddCommandBarControl Method
Visual Studio 2010
Adds a control to a command bar.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
int AddCommandBarControl( string pszCmdNameCanonical, Object pCmdBarParent, uint dwIndex, uint dwCmdType, out 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.Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.