次の方法で共有


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

'宣言
Function CreateIconImageButton ( _
    hwnd As IntPtr, _
    hicon As IntPtr, _
    bwiPos As UInteger, _
    <OutAttribute> ByRef ppImageButton As IVsImageButton _
) As Integer
'使用
Dim instance As IVsUIShell2
Dim hwnd As IntPtr
Dim hicon As IntPtr
Dim bwiPos As UInteger
Dim ppImageButton As IVsImageButton
Dim returnValue As Integer

returnValue = instance.CreateIconImageButton(hwnd, _
    hicon, bwiPos, ppImageButton)
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
)
function CreateIconImageButton(
    hwnd : IntPtr, 
    hicon : IntPtr, 
    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.

  • hicon
    Type: System.IntPtr

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

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

Permissions

See Also

Reference

IVsUIShell2 Interface

IVsUIShell2 Members

Microsoft.VisualStudio.Shell.Interop Namespace