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
- 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.
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
- 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.