次の方法で共有


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
)
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.

Permissions

See Also

Reference

IVsUIShell2 Interface

IVsUIShell2 Members

Microsoft.VisualStudio.Shell.Interop Namespace