다음을 통해 공유


IVsButtonBarClient.SetButtonBar Method

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)

Syntax

‘선언
Function SetButtonBar ( _
    pButtonBar As IVsButtonBar _
) As Integer
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 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.

.NET Framework Security

See Also

Reference

IVsButtonBarClient Interface

Microsoft.VisualStudio.TextManager.Interop Namespace