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);
public int SetupToolbar (IntPtr hwnd, Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbar ptwt, out Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbarHost pptwth);
abstract member SetupToolbar : nativeint * Microsoft.VisualStudio.Shell.Interop.IVsToolWindowToolbar * IVsToolWindowToolbarHost -> int
Public Function SetupToolbar (hwnd As IntPtr, ptwt As IVsToolWindowToolbar, ByRef pptwth As IVsToolWindowToolbarHost) As Integer

Parameters

hwnd
IntPtr

nativeint

[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