Compartir a través de


IVsUIShell2.CreateIconImageButton Method

Creates a mixed image/text button using the specified icon 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 CreateIconImageButton ( _
    hwnd As IntPtr, _
    hicon As IntPtr, _
    bwiPos As UInteger, _
    <OutAttribute> ByRef ppImageButton As IVsImageButton _
) As Integer
int CreateIconImageButton(
    IntPtr hwnd,
    IntPtr hicon,
    uint bwiPos,
    out IVsImageButton ppImageButton
)
int CreateIconImageButton(
    [InAttribute] IntPtr hwnd, 
    [InAttribute] IntPtr hicon, 
    [InAttribute] unsigned int bwiPos, 
    [OutAttribute] IVsImageButton^% ppImageButton
)
abstract CreateIconImageButton : 
        hwnd:IntPtr * 
        hicon:IntPtr * 
        bwiPos:uint32 * 
        ppImageButton:IVsImageButton byref -> int
function CreateIconImageButton(
    hwnd : IntPtr, 
    hicon : IntPtr, 
    bwiPos : uint, 
    ppImageButton : IVsImageButton
) : int

Parameters

  • hwnd
    Type: IntPtr

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

  • hicon
    Type: IntPtr

    [in] Handle to the icon to be used as the image for the new button.

  • bwiPos
    Type: UInt32

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

Return Value

Type: 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]  HICON             hicon,
   [in]  BWI_IMAGE_POS     pos,
   [out] IVsImageButton**  ppImageButton
);

.NET Framework Security

See Also

Reference

IVsUIShell2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace