Export (0) Print
Expand All
Expand Minimize


Retrieves the handle of an image list used for drawing list view items.

CImageList* GetImageList(
   int nImageList 
) const;


Value specifying which image list to retrieve. It can be one of these values:
  • LVSIL_NORMAL   Image list with large icons.
  • LVSIL_SMALL   Image list with small icons.
  • LVSIL_STATE   Image list with state images.

Return Value

A pointer to the image list used for drawing list view items.


// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
// The new image list of the list view control.
extern CImageList* pmyImageList;

ASSERT(pmyListCtrl->GetImageList(LVSIL_NORMAL) == NULL);

pmyListCtrl->SetImageList(pmyImageList, LVSIL_NORMAL);
ASSERT(pmyListCtrl->GetImageList(LVSIL_NORMAL) == pmyImageList);

See Also

CListCtrl Overview | Class Members | Hierarchy Chart | CImageList | CListCtrl::SetImageList

© 2015 Microsoft