IVsButtonBarClient::SetButtonBar Method (IVsButtonBar^)

 

Called by the button bar to hook itself up to this client.

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

int SetButtonBar(
	IVsButtonBar^ pButtonBar
)

Parameters

pButtonBar
Type: Microsoft.VisualStudio.TextManager.Interop::IVsButtonBar^

[in] Pointer to the button bar.

Return Value

Type: System::Int32

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

From textmgr.idl:

HRESULT IVsButtonBarClient::SetButtonBar(
   [in] IVsButtonBar *pButtonBar
);

SetButtonBar is called by the button bar to hook itself up to the client. The reason this callback is necessary rather than relying on a return value from AddButtonBar is that client callbacks are required as a result of attaching the combo bar, before AddButtonBar returns. SetButtonBar should be called only once.

Return to top
Show: