Поделиться через


IVsButtonBar.Attach - метод

Создает сочетания окна/кнопки.

Пространство имен:  Microsoft.VisualStudio.TextManager.Interop
Сборка:  Microsoft.VisualStudio.TextManager.Interop (в Microsoft.VisualStudio.TextManager.Interop.dll)

Синтаксис

'Декларация
Function Attach ( _
    hwndParent As IntPtr, _
    cButtons As Integer, _
    hImageList As IntPtr, _
    pClient As IVsButtonBarClient _
) As Integer
int Attach(
    IntPtr hwndParent,
    int cButtons,
    IntPtr hImageList,
    IVsButtonBarClient pClient
)
int Attach(
    [InAttribute] IntPtr hwndParent, 
    [InAttribute] int cButtons, 
    [InAttribute] IntPtr hImageList, 
    [InAttribute] IVsButtonBarClient^ pClient
)
abstract Attach : 
        hwndParent:IntPtr * 
        cButtons:int * 
        hImageList:IntPtr * 
        pClient:IVsButtonBarClient -> int
function Attach(
    hwndParent : IntPtr, 
    cButtons : int, 
    hImageList : IntPtr, 
    pClient : IVsButtonBarClient
) : int

Параметры

  • hwndParent
    Тип: IntPtr

    [in] дескриптор родительского окна.

  • cButtons
    Тип: Int32

    [in]

  • hImageList
    Тип: IntPtr

    [in] дескриптор к списку образа.

Возвращаемое значение

Тип: Int32
Если метод завершается успешно, возвращается S_OK.Если происходит сбой, возвращается код ошибки.

Заметки

Модель COM подписи

Из textmgr2.idl:

HRESULT IVsButtonBar::Attach(
   [in] HWND hwndParent,
   [in] long cButtons,
   [in] HANDLE hImageList,
   [in] IVsButtonBarClient *pClient
);

AddButtonBarвызывает by Attach . Attach создает и combos окно кнопки и настраивает соединение между строкой кнопки и клиентом. Не эта функция вызывается, если не обход IVsButtonBarManager. Каждый bmp в списке образа ДОЛЖЕН быть 16x16.

Безопасность платформы .NET Framework

См. также

Ссылки

IVsButtonBar Интерфейс

Microsoft.VisualStudio.TextManager.Interop - пространство имен