IVsUIShell2.CreateGlyphImageButton 方法

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

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

语法

声明
Function CreateGlyphImageButton ( _
    hwnd As IntPtr, _
    chGlyph As UShort, _
    xShift As Integer, _
    yShift As Integer, _
    bwiPos As UInteger, _
    <OutAttribute> ByRef ppImageButton As IVsImageButton _
) As Integer
int CreateGlyphImageButton(
    IntPtr hwnd,
    ushort chGlyph,
    int xShift,
    int yShift,
    uint bwiPos,
    out IVsImageButton ppImageButton
)

参数

  • hwnd
    类型:System.IntPtr
    [in] 处理为的窗口拥有创建的按钮。目前, Visual Studio 忽略此值。
  • chGlyph
    类型:System.UInt16
    [in] 表示标志符号的字符。
  • xShift
    类型:System.Int32
    [in] 进度右侧,在逻辑单位,转换标志符号。
  • yShift
    类型:System.Int32
    [in] 进度下,在逻辑单位,转换标志符号。

返回值

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

备注

COM 签名

从 vsshell80.idl:

HRESULT IVsUIShell2:: CreateGlyphImageButton(
   [in]  HWND             hwnd,
   [in]  WCHAR            chGlyph,
   [in]  int              xShift,
   [in]  int              yShift,
   [in]  BWI_IMAGE_POS    pos,
   [out] IVsImageButton** ppImageButton
);

例如标志符号是从表示可视化符号 (如窗架的 " 关闭 " 按钮字符集中的一个字符,。

.NET Framework 安全性

请参见

参考

IVsUIShell2 接口

Microsoft.VisualStudio.Shell.Interop 命名空间