IVsUIShell2.CreateIconImageButton 方法

创建一个混合映像/文本按钮使用指定的图标为图像。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)

语法

声明
Function CreateIconImageButton ( _
    hwnd As IntPtr, _
    hicon As IntPtr, _
    bwiPos As UInteger, _
    <OutAttribute> ByRef ppImageButton As IVsImageButton _
) As Integer
int CreateIconImageButton(
    IntPtr hwnd,
    IntPtr hicon,
    uint bwiPos,
    out IVsImageButton ppImageButton
)

参数

  • hwnd
    类型:System.IntPtr
    [in] 处理为的窗口拥有创建的按钮。目前, Visual Studio 忽略此值。
  • hicon
    类型:System.IntPtr
    [in] 设置为图像将使用的图标句柄为新按钮。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell80.idl:

HRESULT IVsUIShell2:: CreateGlyphImageButton(
   [in]  HWND              hwnd,
   [in]  HICON             hicon,
   [in]  BWI_IMAGE_POS     pos,
   [out] IVsImageButton**  ppImageButton
);

.NET Framework 安全性

请参见

参考

IVsUIShell2 接口

Microsoft.VisualStudio.Shell.Interop 命名空间