IVsUIShell4.SetupToolbar3 Method
Creates a tool bar and also allows 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 SetupToolbar3 ( _
pFrame As IVsWindowFrame, _
<OutAttribute> ByRef pptwth As IVsToolWindowToolbarHost _
) As Integer
int SetupToolbar3(
IVsWindowFrame pFrame,
out IVsToolWindowToolbarHost pptwth
)
int SetupToolbar3(
[InAttribute] IVsWindowFrame^ pFrame,
[OutAttribute] IVsToolWindowToolbarHost^% pptwth
)
abstract SetupToolbar3 :
pFrame:IVsWindowFrame *
pptwth:IVsToolWindowToolbarHost byref -> int
function SetupToolbar3(
pFrame : IVsWindowFrame,
pptwth : IVsToolWindowToolbarHost
) : int
Parameters
- pFrame
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame
[in] The window frame for the new toolbar.
- pptwth
Type: Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbarHost%
[out] Location to return the tool bar hosting interface.
Return Value
Type: System.Int32
Returns S_OK if the tool bar was set up.
Remarks
This version of the SetupToolbar() method is designed to be used directly with IVsWindowFrame instances. In the new WPF windowing system it is much more convenient to use the IVsWindowFrame interface instead of trying to get the HWND of window. If the IVsWindowFrame object supports the IOleCommandTarget interface, then it will be used as the target for the commands that appear on the toolbars, otherwise the shell's global command target will be used.
.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.