IVsUIShell::SetupToolbar Method (IntPtr, IVsToolWindowToolbar^, IVsToolWindowToolbarHost^)

 

Called by VSPackage that creates a tool window in order to attach a toolbar to the tool window.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int SetupToolbar(
	IntPtr hwnd,
	IVsToolWindowToolbar^ ptwt,
	[OutAttribute] IVsToolWindowToolbarHost^% pptwth
)

Parameters

hwnd
Type: System::IntPtr

[in] Handle to the window in which the toolbar is to be set up.

ptwt
Type: Microsoft.VisualStudio.Shell.Interop::IVsToolWindowToolbar^

[in] Pointer to the IVsToolWindowToolbar interface for the new toolbar.

pptwth
Type: Microsoft.VisualStudio.Shell.Interop::IVsToolWindowToolbarHost^

[out] Pointer to the IVsToolWindowToolbarHost interface.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsUIShell::SetupToolbar(
   [in] HWND hwnd,
   [in] IVsToolWindowToolbar *ptwt,
   [out] IVsToolWindowToolbarHost **pptwth
);
Return to top
Show: