共用方式為


IVsButtonBarManager.GetButtonBar Method

Returns the button bar associated with a code window.

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

Syntax

'宣告
Function GetButtonBar ( _
    <OutAttribute> ByRef ppButtonBar As IVsButtonBar _
) As Integer
int GetButtonBar(
    out IVsButtonBar ppButtonBar
)
int GetButtonBar(
    [OutAttribute] IVsButtonBar^% ppButtonBar
)
abstract GetButtonBar : 
        ppButtonBar:IVsButtonBar byref -> int 
function GetButtonBar(
    ppButtonBar : 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 IVsButtonBarManager::GetButtonBar(
   [out] IVsButtonBar **ppButtonBar
);

GetButtonBar sends back the button bar associated with a code window, if any. If a button bar is associated with the window, GetButtonBar returns S_OK and sends back an AddRef'd pointer to the button bar. Otherwise it returns S_FALSE and sets ppButtonBar to nulla null reference (Nothing in Visual Basic).

.NET Framework Security

See Also

Reference

IVsButtonBarManager Interface

Microsoft.VisualStudio.TextManager.Interop Namespace