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

‘선언
Function CreateGlyphImageButton ( _
    hwnd As IntPtr, _
    chGlyph As UShort, _
    xShift As Integer, _
    yShift As Integer, _
    bwiPos As UInteger, _
    <OutAttribute> ByRef ppImageButton As IVsImageButton _
) As Integer
‘사용 방법
Dim instance As IVsUIShell2
Dim hwnd As IntPtr
Dim chGlyph As UShort
Dim xShift As Integer
Dim yShift As Integer
Dim bwiPos As UInteger
Dim ppImageButton As IVsImageButton
Dim returnValue As Integer

returnValue = instance.CreateGlyphImageButton(hwnd, _
    chGlyph, xShift, yShift, bwiPos, ppImageButton)
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

IVsUIShell2 Members

Microsoft.VisualStudio.Shell.Interop Namespace