Advertisement

How can I place an icon/bitmap on...?

Started by December 21, 2000 05:42 AM
0 comments, last by zhang_zhou 24 years ago
Hey,all guys... What my problem is--- I want to place a icon or bitmap on the subitem(the items after the first item on every item) in the List control(CListCtrl),but I dont know how I can do? Do you know? and can you help me? Any help will be much welcome and thankful!!
============================= Hey,I just wanna know WHY! =============================
First, you need to create an image list object. Load all of the icons you need into it. Then attatch that image list to the list view control. CListCtrl''s InsertItem and SetItem both have parameters allowing you to specify the index of icon you want to display for it (you may also need to specify a certain flag value to indicate that you want to set/change the icon, depending upon which overloaded version of those methods you use). If you need more specific information, please check out MSDN under CImageList, CListCtrl::SetImageList, CListCtrl::InsertItem, and CListCtrl::SetItem. Good luck.

This topic is closed to new replies.

Advertisement