Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Change Image in CListCtrl

Change Image in CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marc Tompkins
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • M Marc Tompkins

      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

      A Offline
      A Offline
      Abbas_Riazi
      wrote on last edited by
      #2

      Use LVITEM structure with SetItem member function. It's very easy! A. Riazi

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups