Freigeben über


IVsProfferCommands3.AddCommandBarControl Method

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)

Syntax

'Declaration
Function AddCommandBarControl ( _
    pszCmdNameCanonical As String, _
    pCmdBarParent As Object, _
    dwIndex As UInteger, _
    dwCmdType As UInteger, _
    <OutAttribute> ByRef ppCmdBarCtrl As Object _
) As Integer
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: String

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

  • pCmdBarParent
    Type: Object

    [in] The parent command bar.

  • dwIndex
    Type: UInt32

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

  • ppCmdBarCtrl
    Type: Object%

    [out] The new control.

Return Value

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

.NET Framework Security

See Also

Reference

IVsProfferCommands3 Interface

Microsoft.VisualStudio.Shell.Interop Namespace