IVsUIShell2::CreateIconImageButton Method (IntPtr, IntPtr, UInt32, IVsImageButton^)

 

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)

int CreateIconImageButton(
	IntPtr hwnd,
	IntPtr hicon,
	unsigned int bwiPos,
	[OutAttribute] IVsImageButton^% ppImageButton
)

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.

bwiPos
Type: System::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
Type: Microsoft.VisualStudio.Shell.Interop::IVsImageButton^

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

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell80.idl:

HRESULT IVsUIShell2:: CreateGlyphImageButton(
   [in]  HWND              hwnd,
   [in]  HICON             hicon,
   [in]  BWI_IMAGE_POS     pos,
   [out] IVsImageButton**  ppImageButton
);
Return to top
Show: