Share via


IVsButtonBarClient.SetButtonBar(IVsButtonBar) Method

Definition

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

public:
 int SetButtonBar(Microsoft::VisualStudio::TextManager::Interop::IVsButtonBar ^ pButtonBar);
public:
 int SetButtonBar(Microsoft::VisualStudio::TextManager::Interop::IVsButtonBar ^ pButtonBar);
int SetButtonBar(Microsoft::VisualStudio::TextManager::Interop::IVsButtonBar const & pButtonBar);
public int SetButtonBar (Microsoft.VisualStudio.TextManager.Interop.IVsButtonBar pButtonBar);
abstract member SetButtonBar : Microsoft.VisualStudio.TextManager.Interop.IVsButtonBar -> int
Public Function SetButtonBar (pButtonBar As IVsButtonBar) As Integer

Parameters

pButtonBar
IVsButtonBar

[in] Pointer to the button bar.

Returns

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

Remarks

COM Signature

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.

Applies to