IVsDropdownBarClient::GetEntryImage Method (Int32, Int32, Int32)

 

Returns the glyph associated with a combo entry.

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

int GetEntryImage(
	int iCombo,
	int iIndex,
	[OutAttribute] int% piImageIndex
)

Parameters

iCombo
Type: System::Int32

[in] The drop-down bar/Window combo.

iIndex
Type: System::Int32

[in] Index of item of interest.

piImageIndex
Type: System::Int32

[out] Index of glyph in the image list.

Return Value

Type: System::Int32

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

From textmgr.idl:

HRESULT IVsDropdownBarClient::GetEntryImage(
   [in] long iCombo,
   [in] long iIndex,
   [out] long *piImageIndex
);

GetImage will only be called if you specified ENTRY_IMAGE for the entry attributes of the given combo. There are two expected return codes from GetImage:

  • S_OK: Draw the glyph indicated in *piImageIndex. Use this for entries that should have a glyph.

  • S_FALSE: Set aside space for a glyph, but don't draw anything. Use this for entries that don't have a glyph but might have sibling entries in the same combo with glyphs.

  • Other: Some other failure occurred.

Glyphs in your image lists are assumed to be of the same height.

Return to top
Show: