IVsUIShell4::SetupToolbar2 Method (IntPtr, IVsToolWindowToolbar^, IOleCommandTarget^, IVsToolWindowToolbarHost^)
Visual Studio 2015
Creates a tool bar and also allows the 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 SetupToolbar2(
IntPtr hwnd,
IVsToolWindowToolbar^ ptwt,
IOleCommandTarget^ pCmdTarget,
[OutAttribute] IVsToolWindowToolbarHost^% pptwth
)
Parameters
- hwnd
-
Type:
System::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: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
This method extends the SetupToolbar method.
Show: