Click here to Skip to main content
14,354,963 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all,

I want to insert multi images in one row of CListCtrl MFC.
I have created a CImageList and display it in CListCtrl successfully. But just one image in a row. When I assign more than 1 CImageList in CListCtrl, it can't display exactly.

Thanks in advance in any help.

Sorry for my poor English.
Posted
Updated 8-Mar-16 8:36am
Rate this:
Please Sign up or sign in to vote.

Solution 1

You can use custom drawing to emulate multiple icons per row.
http://msdn.microsoft.com/en-us/library/bb761817(v=vs.85).aspx[^]

You should handle item prepaint event to draw your icons in the correct places.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Luong...did you ever solve this problem years ago? I am not sure if you chose to use the LVS_REPORT style. I am, and following this example
Using a Virtual CListCtrl to Display Text and Bitmaps[^]
and tweaking it to test on pItem->iSubItem to display the image in the column you want.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100