Partager via


CMFCShellListCtrl::OnGetItemIcon

The framework calls this method to retrieve the icon associated with a shell list item.

virtual int OnGetItemIcon(
   int iItem,
   LPAFX_SHELLITEMINFO pItem
);

Parameters

  • [in] iItem
    The item index.

  • [in] pItem
    A LPAFX_SHELLITEMINFO parameter that describes the item.

Return Value

The index of the icon image if successful; -1 if the function fails.

Remarks

The icon image index is based on the system image list.

By default, this method relies on the pItem parameter. The value of iItem is not used in the default implementation. You can use iItem to implement custom behavior.

Requirements

Header: afxshelllistctrl.h

See Also

Reference

CMFCShellListCtrl Class

Hierarchy Chart