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: System.IntPtr[in] Handle to the window in which the toolbar is to be set up.
ptwt
Type: Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbar[in] Pointer to the IVsToolWindowToolbar interface for the new toolbar.
pptwth
Type: Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbarHost%[out] Pointer to the IVsToolWindowToolbarHost interface.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.