Freigeben über


IVsUIShell.SetupToolbar Method

Called by VSPackage that creates a tool window in order to attach a toolbar to the tool window.

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

Syntax

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

Parameters

  • hwnd
    Type: IntPtr

    [in] Handle to the window in which the toolbar is to be set up.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::SetupToolbar(
   [in] HWND hwnd,
   [in] IVsToolWindowToolbar *ptwt,
   [out] IVsToolWindowToolbarHost **pptwth
);

.NET Framework Security

See Also

Reference

IVsUIShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace