Change Image in CListCtrl
-
I'm looking for an example of how to change images in a CListView. The items in my list can be edited, once edited I want to change the image so the user has a visual clue that the item has been modified. When the document is saved, the orignal image will be restored. An example of this capability is Microsofts Visual Source Safe (VSS). When you check out a file, its image (file icon) gets a red check-mark and red border. When the file is checked in, the check-mark and border are removed. I've experimented with I_IMAGECALLBACK, but it seems the callback only happens once when the item is inserted in the list control. I've read a little about image overlays in MSDN, but I can't find enough information to make an attempt at using them. I'm not even sure if it's the appropriate solution. Any help is much appreciated. Marc
-
I'm looking for an example of how to change images in a CListView. The items in my list can be edited, once edited I want to change the image so the user has a visual clue that the item has been modified. When the document is saved, the orignal image will be restored. An example of this capability is Microsofts Visual Source Safe (VSS). When you check out a file, its image (file icon) gets a red check-mark and red border. When the file is checked in, the check-mark and border are removed. I've experimented with I_IMAGECALLBACK, but it seems the callback only happens once when the item is inserted in the list control. I've read a little about image overlays in MSDN, but I can't find enough information to make an attempt at using them. I'm not even sure if it's the appropriate solution. Any help is much appreciated. Marc
Use LVITEM structure with SetItem member function. It's very easy! A. Riazi