Compartilhar via


IVsUIShell2.CreateIconImageButton Method

Definition

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

public:
 int CreateIconImageButton(IntPtr hwnd, IntPtr hicon, System::UInt32 bwiPos, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsImageButton ^ % ppImageButton);
public int CreateIconImageButton (IntPtr hwnd, IntPtr hicon, uint bwiPos, out Microsoft.VisualStudio.Shell.Interop.IVsImageButton ppImageButton);
abstract member CreateIconImageButton : nativeint * nativeint * uint32 * IVsImageButton -> int
Public Function CreateIconImageButton (hwnd As IntPtr, hicon As IntPtr, bwiPos As UInteger, ByRef ppImageButton As IVsImageButton) As Integer

Parameters

hwnd
IntPtr

nativeint

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

hicon
IntPtr

nativeint

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

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

ppImageButton
IVsImageButton

[out] Returns an IVsImageButton object representing the new button.

Returns

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

Applies to