Compartir a través de


IVsDropdownBarClient.GetEntryImage Method

Returns the glyph associated with a combo entry.

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

Syntax

'Declaration
Function GetEntryImage ( _
    iCombo As Integer, _
    iIndex As Integer, _
    <OutAttribute> ByRef piImageIndex As Integer _
) As Integer
int GetEntryImage(
    int iCombo,
    int iIndex,
    out int piImageIndex
)
int GetEntryImage(
    [InAttribute] int iCombo, 
    [InAttribute] int iIndex, 
    [OutAttribute] int% piImageIndex
)
abstract GetEntryImage : 
        iCombo:int * 
        iIndex:int * 
        piImageIndex:int byref -> int
function GetEntryImage(
    iCombo : int, 
    iIndex : int, 
    piImageIndex : int
) : int

Parameters

  • iCombo
    Type: System.Int32

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

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

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.

.NET Framework Security

See Also

Reference

IVsDropdownBarClient Interface

Microsoft.VisualStudio.TextManager.Interop Namespace