Partager via


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

'Déclaration
Function SetupToolbar ( _
    hwnd As IntPtr, _
    ptwt As IVsToolWindowToolbar, _
    <OutAttribute> ByRef pptwth As IVsToolWindowToolbarHost _
) As Integer
'Utilisation
Dim instance As IVsUIShell
Dim hwnd As IntPtr
Dim ptwt As IVsToolWindowToolbar
Dim pptwth As IVsToolWindowToolbarHost
Dim returnValue As Integer

returnValue = instance.SetupToolbar(hwnd, _
    ptwt, pptwth)
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: System.IntPtr
    [in] Handle to the window in which the toolbar is to be set up.

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 IVsUIShell::SetupToolbar(
   [in] HWND hwnd,
   [in] IVsToolWindowToolbar *ptwt,
   [out] IVsToolWindowToolbarHost **pptwth
);

.NET Framework Security

See Also

Reference

IVsUIShell Interface

IVsUIShell Members

Microsoft.VisualStudio.Shell.Interop Namespace