IVsUIShell2.CreateGlyphImageButton 方法

定义

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

public:
 int CreateGlyphImageButton(IntPtr hwnd, System::UInt16 chGlyph, int xShift, int yShift, System::UInt32 bwiPos, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsImageButton ^ % ppImageButton);
public int CreateGlyphImageButton (IntPtr hwnd, ushort chGlyph, int xShift, int yShift, uint bwiPos, out Microsoft.VisualStudio.Shell.Interop.IVsImageButton ppImageButton);
abstract member CreateGlyphImageButton : nativeint * uint16 * int * int * uint32 * IVsImageButton -> int
Public Function CreateGlyphImageButton (hwnd As IntPtr, chGlyph As UShort, xShift As Integer, yShift As Integer, bwiPos As UInteger, ByRef ppImageButton As IVsImageButton) As Integer

参数

hwnd
IntPtr

nativeint

中要拥有创建的按钮的窗口的句柄。 目前,Visual Studio 将忽略此值。

chGlyph
UInt16

中表示要使用的标志符号的字符。

xShift
Int32

中逻辑单元中向右移动标志符号的距离。

yShift
Int32

中逻辑单元中要移动标志符号的距离(以逻辑单位为单位)。

bwiPos
UInt32

中一个来自枚举的值,该值 __BWI_IMAGE_POS 指定标志符号相对于按钮中任何文本的位置。

ppImageButton
IVsImageButton

弄返回一个 IVsImageButton 表示新按钮的对象。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell80:

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

字形是表示视觉符号(例如窗口框架中的 "关闭" 按钮)的字符集中的字符,例如。

适用于