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
)
function SetButtonBar(
pButtonBar : IVsButtonBar
) : int
Parameters
pButtonBar
Type: Microsoft.VisualStudio.TextManager.Interop.IVsButtonBar[in] Pointer to the Buttonbar.
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.