次の方法で共有


IVsUIShell4.SetupToolbar2 Method

Definition

Creates a tool bar and also allows the routing of commands placed on the toolbar to a specific command target.

public:
 int SetupToolbar2(IntPtr hwnd, Microsoft::VisualStudio::Shell::Interop::IVsToolWindowToolbar ^ ptwt, Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pCmdTarget, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsToolWindowToolbarHost ^ % pptwth);
public int SetupToolbar2 (IntPtr hwnd, Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbar ptwt, Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget pCmdTarget, out Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbarHost pptwth);
abstract member SetupToolbar2 : nativeint * Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbar * Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget * IVsToolWindowToolbarHost -> int
Public Function SetupToolbar2 (hwnd As IntPtr, ptwt As IVsToolWindowToolbar, pCmdTarget As IOleCommandTarget, ByRef pptwth As IVsToolWindowToolbarHost) As Integer

Parameters

hwnd
IntPtr

nativeint

[in] The HWND of the hosting window tray.

ptwt
IVsToolWindowToolbar

[in] The tool bar space negotiator.

pCmdTarget
IOleCommandTarget

[in] The command target for window-specific command handling.

pptwth
IVsToolWindowToolbarHost

[out] The tool bar host.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method extends the SetupToolbar method.

Applies to