创建一个混合映像/文本按钮使用指定的标志符号为图像。
命名空间: 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] 进度下,在逻辑单位,转换标志符号。
- bwiPos
类型:System.UInt32
- ppImageButton
类型:Microsoft.VisualStudio.Shell.Interop.IVsImageButton%
[out] 返回表示新按钮的 IVsImageButton 对象。
返回值
类型: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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。