IVsProfferCommands4.AddCommandBarControl Method (String, Object, UInt32, UInt32, Object%)

Adds a control to a command bar.

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

Syntax

'Declaración
Function AddCommandBarControl ( _
    pszCmdNameCanonical As String, _
    pCmdBarParent As Object, _
    dwIndex As UInteger, _
    dwCmdType As UInteger, _
    <OutAttribute> ByRef ppCmdBarCtrl As Object _
) As Integer
'Uso
Dim instance As IVsProfferCommands4
Dim pszCmdNameCanonical As String
Dim pCmdBarParent As Object
Dim dwIndex As UInteger
Dim dwCmdType As UInteger
Dim ppCmdBarCtrl As Object
Dim returnValue As Integer

returnValue = instance.AddCommandBarControl(pszCmdNameCanonical, _
    pCmdBarParent, dwIndex, dwCmdType, _
    ppCmdBarCtrl)
int AddCommandBarControl(
    string pszCmdNameCanonical,
    Object pCmdBarParent,
    uint dwIndex,
    uint dwCmdType,
    out Object ppCmdBarCtrl
)
int AddCommandBarControl(
    [InAttribute] String^ pszCmdNameCanonical, 
    [InAttribute] Object^ pCmdBarParent, 
    [InAttribute] unsigned int dwIndex, 
    [InAttribute] unsigned int dwCmdType, 
    [OutAttribute] Object^% ppCmdBarCtrl
)
abstract AddCommandBarControl : 
        pszCmdNameCanonical:string * 
        pCmdBarParent:Object * 
        dwIndex:uint32 * 
        dwCmdType:uint32 * 
        ppCmdBarCtrl:Object byref -> int 
function AddCommandBarControl(
    pszCmdNameCanonical : String, 
    pCmdBarParent : Object, 
    dwIndex : uint, 
    dwCmdType : uint, 
    ppCmdBarCtrl : Object
) : int

Parameters

  • pszCmdNameCanonical
    Type: System.String
    [in] The fully qualified (canonical) name of the control to add.
  • dwIndex
    Type: System.UInt32
    [in] The index location at which to place the control.
  • ppCmdBarCtrl
    Type: System.Object%
    [out] The newly added control.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsProfferCommands3.AddCommandBarControl(String, Object, UInt32, UInt32, Object%)

.NET Framework Security

See Also

Reference

IVsProfferCommands4 Interface

IVsProfferCommands4 Members

AddCommandBarControl Overload

Microsoft.VisualStudio.Shell.Interop Namespace