Método IVsButtonBar.Attach
Cria combinações/botão da janela.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (em Microsoft.VisualStudio.TextManager.Interop.dll)
Sintaxe
'Declaração
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
Parâmetros
hwndParent
Tipo: IntPtr[in] Identificador para a janela pai.
cButtons
Tipo: Int32[in]
hImageList
Tipo: IntPtr[in] Identificador para uma lista de imagens.
pClient
Tipo: Microsoft.VisualStudio.TextManager.Interop.IVsButtonBarClient[in]
Valor de retorno
Tipo: Int32
Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.
Comentários
COM assinatura
De textmgr2.idl:
HRESULT IVsButtonBar::Attach(
[in] HWND hwndParent,
[in] long cButtons,
[in] HANDLE hImageList,
[in] IVsButtonBarClient *pClient
);
Attaché chamado pelo AddButtonBar. Attachcria a janela e o botão combos e configura um vínculo entre a barra de botões e o seu cliente. Não chame essa função, a menos que você está a ignorar IVsButtonBarManager. Cada bmp na lista de imagens deve ser 16 x 16.
Segurança do .NET Framework
- Confiança total para o chamador imediato. O membro não pode ser usado por código parcialmente confiável. Para obter mais informações, consulte Usando bibliotecas de código parcialmente confiável.