Click here to Skip to main content
15,911,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to add multiple images in list control using CImageList class. I know we can add multiple images as ICON with list control property as ICON. But I want to show images in CListCtrl in Report view, the same way as we see our contacts in mobile phones i.e in first column user image and second column with its details.
Can someone suggest me how to use CImageList class or there is any alternative we can use to load different images in different rows.

Regds
SNI
Posted

1 solution

The image lists in a ListCtrl are indeed more geared towards representing a limited set of small images, for example as file type or status indicators.

In your case I would make the ListCtrl owner-drawn, store a pointer to the image in the user-data part of the item and draw the image in the owner draw code. If you are starting to work with list controls more intensely I would recommend to get acquainted with the owner draw and custom draw functionality anyhow. MSDN is as usual a good place to start reading.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900