IVsUIShell4::SetupToolbar3 Method (IVsWindowFrame^, IVsToolWindowToolbarHost^)
Visual Studio 2015
Creates a tool bar and also allows routing of commands placed on the toolbar to a specific command target.
Assembly: Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
int SetupToolbar3(
IVsWindowFrame^ pFrame,
[OutAttribute] IVsToolWindowToolbarHost^% pptwth
)
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.
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.
Show: