Partager via


IVsToolWindowToolbarHost.AddToolbar Method

Adds a toolbar to the tool window.

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

Syntax

'Déclaration
Function AddToolbar ( _
    dwLoc As VSTWT_LOCATION, _
    ByRef pguid As Guid, _
    dwId As UInteger _
) As Integer
'Utilisation
Dim instance As IVsToolWindowToolbarHost
Dim dwLoc As VSTWT_LOCATION
Dim pguid As Guid
Dim dwId As UInteger
Dim returnValue As Integer

returnValue = instance.AddToolbar(dwLoc, _
    pguid, dwId)
int AddToolbar(
    VSTWT_LOCATION dwLoc,
    ref Guid pguid,
    uint dwId
)
int AddToolbar(
    [InAttribute] VSTWT_LOCATION dwLoc, 
    [InAttribute] Guid% pguid, 
    [InAttribute] unsigned int dwId
)
function AddToolbar(
    dwLoc : VSTWT_LOCATION, 
    pguid : Guid, 
    dwId : uint
) : int

Parameters

  • pguid
    Type: System.Guid%

    [in] Pointer to a unique identifier for the toolbar's menu group.

  • dwId
    Type: System.UInt32

    [in] DWORD that, in combination with pguid, identifies the toolbar to be added.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsToolWindowToolbarHost::AddToolbar(
   [in] VSTWT_LOCATION dwLoc,
   [in] const GUID *pguid,
   [in] DWORD dwId
);

Permissions

See Also

Reference

IVsToolWindowToolbarHost Interface

IVsToolWindowToolbarHost Members

Microsoft.VisualStudio.Shell.Interop Namespace