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.
ptwt
Type: Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbar[in] The tool bar space negotiator.
pCmdTarget
Type: Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget[in] The command target for window-specific command handling.
pptwth
Type: Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbarHost%[out] The tool bar host.
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
- 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.