IVsUIShell2.CreateGlyphImageButton Method

Definition

Creates a mixed image/text button using the specified glyph as the image.

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

Parameters

hwnd
IntPtr

nativeint

[in] Handle to the window that is to own the created button. Currently, Visual Studio ignores this value.

chGlyph
UInt16

[in] The character representing the glyph to use.

xShift
Int32

[in] How far to the right, in logical units, to shift the glyph.

yShift
Int32

[in] How far down, in logical units, to shift the glyph.

bwiPos
UInt32

[in] A value from the __BWI_IMAGE_POS enumeration specifying how the glyph should be positioned in relation to any text in the button.

ppImageButton
IVsImageButton

[out] Returns an IVsImageButton object representing the new button.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From 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  
);  

The glyph is a character from a character set representing a visual symbol such as the close button in a window frame, for example.

Applies to