IVsButtonBarClient.SetButtonBar Method

Called by the Buttonbar to hook itself up to the client.

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

Syntax

声明
Function SetButtonBar ( _
    pButtonBar As IVsButtonBar _
) As Integer
用法
Dim instance As IVsButtonBarClient
Dim pButtonBar As IVsButtonBar
Dim returnValue As Integer

returnValue = instance.SetButtonBar(pButtonBar)
int SetButtonBar(
    IVsButtonBar pButtonBar
)
int SetButtonBar(
    [InAttribute] IVsButtonBar^ pButtonBar
)
abstract SetButtonBar : 
        pButtonBar:IVsButtonBar -> int 
function SetButtonBar(
    pButtonBar : IVsButtonBar
) : int

Parameters

Return Value

Type: System.Int32
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 Buttonbar 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.

.NET Framework Security

See Also

Reference

IVsButtonBarClient Interface

IVsButtonBarClient Members

Microsoft.VisualStudio.TextManager.Interop Namespace