Share via


IVsUIShell2.CreateGlyphImageButton Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'Declaration
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
)
int CreateGlyphImageButton(
    [InAttribute] IntPtr hwnd, 
    [InAttribute] unsigned short chGlyph, 
    [InAttribute] int xShift, 
    [InAttribute] int yShift, 
    [InAttribute] unsigned int bwiPos, 
    [OutAttribute] IVsImageButton^% ppImageButton
)
abstract CreateGlyphImageButton : 
        hwnd:IntPtr * 
        chGlyph:uint16 * 
        xShift:int * 
        yShift:int * 
        bwiPos:uint32 * 
        ppImageButton:IVsImageButton byref -> int 
function CreateGlyphImageButton(
    hwnd : IntPtr, 
    chGlyph : ushort, 
    xShift : int, 
    yShift : int, 
    bwiPos : uint, 
    ppImageButton : IVsImageButton
) : int

Parameters

  • hwnd
    Type: System.IntPtr
    [in] Handle to the window that is to own the created button. Currently, Visual Studio ignores this value.
  • chGlyph
    Type: System.UInt16
    [in] The character representing the glyph to use.
  • xShift
    Type: System.Int32
    [in] How far to the right, in logical units, to shift the glyph.
  • yShift
    Type: System.Int32
    [in] How far down, in logical units, to shift the glyph.

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsUIShell2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace