IVsUIShell.SetupToolbar Method

Definition

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

public:
 int SetupToolbar(IntPtr hwnd, Microsoft::VisualStudio::Shell::Interop::IVsToolWindowToolbar ^ ptwt, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsToolWindowToolbarHost ^ % pptwth);

Parameters

hwnd
IntPtr

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

ptwt
IVsToolWindowToolbar

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

pptwth
IVsToolWindowToolbarHost

[out] Pointer to the IVsToolWindowToolbarHost interface.

Returns

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

Remarks

COM Signature

From vsshell.idl:

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

Applies to