Compartir a través de


IVsUIShell4.SetupToolbar2 Method

Creates a tool bar and also allows the routing of commands placed on the toolbar to a specific command target.

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

Syntax

'Declaration
Function SetupToolbar2 ( _
    hwnd As IntPtr, _
    ptwt As IVsToolWindowToolbar, _
    pCmdTarget As IOleCommandTarget, _
    <OutAttribute> ByRef pptwth As IVsToolWindowToolbarHost _
) As Integer
int SetupToolbar2(
    IntPtr hwnd,
    IVsToolWindowToolbar ptwt,
    IOleCommandTarget pCmdTarget,
    out IVsToolWindowToolbarHost pptwth
)
int SetupToolbar2(
    [InAttribute] IntPtr hwnd, 
    [InAttribute] IVsToolWindowToolbar^ ptwt, 
    [InAttribute] IOleCommandTarget^ pCmdTarget, 
    [OutAttribute] IVsToolWindowToolbarHost^% pptwth
)
abstract SetupToolbar2 : 
        hwnd:IntPtr * 
        ptwt:IVsToolWindowToolbar * 
        pCmdTarget:IOleCommandTarget * 
        pptwth:IVsToolWindowToolbarHost byref -> int
function SetupToolbar2(
    hwnd : IntPtr, 
    ptwt : IVsToolWindowToolbar, 
    pCmdTarget : IOleCommandTarget, 
    pptwth : IVsToolWindowToolbarHost
) : int

Parameters

  • hwnd
    Type: IntPtr

    [in] The HWND of the hosting window tray.

Return Value

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

Remarks

This method extends the SetupToolbar method.

.NET Framework Security

See Also

Reference

IVsUIShell4 Interface

Microsoft.VisualStudio.Shell.Interop Namespace