다음을 통해 공유


IVsDropdownBarClient.GetEntryImage(Int32, Int32, Int32) Method

Definition

Returns the glyph associated with a combo entry.

public:
 int GetEntryImage(int iCombo, int iIndex, [Runtime::InteropServices::Out] int % piImageIndex);
int GetEntryImage(int iCombo, int iIndex, [Runtime::InteropServices::Out] int & piImageIndex);
public int GetEntryImage (int iCombo, int iIndex, out int piImageIndex);
abstract member GetEntryImage : int * int * int -> int
Public Function GetEntryImage (iCombo As Integer, iIndex As Integer, ByRef piImageIndex As Integer) As Integer

Parameters

iCombo
Int32

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

iIndex
Int32

[in] Index of item of interest.

piImageIndex
Int32

[out] Index of glyph in the image list.

Returns

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

Remarks

COM Signature

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.

Applies to