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. CListView question

CListView question

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • R Offline
    R Offline
    RobJones
    wrote on last edited by
    #1

    Is there a way to insert a item into a list control with the LVIS_STATEIMAGEMASK already set to "checked"? I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list. Right now I insert the item into the list control then SetCheck(0) that causes me to catch the LVIS_STATEIMAGEMASK change when the list is first populated. Any Ideas? Rob Whoever said nothing's impossible never tried slamming a revolving door!

    D 1 Reply Last reply
    0
    • R RobJones

      Is there a way to insert a item into a list control with the LVIS_STATEIMAGEMASK already set to "checked"? I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list. Right now I insert the item into the list control then SetCheck(0) that causes me to catch the LVIS_STATEIMAGEMASK change when the list is first populated. Any Ideas? Rob Whoever said nothing's impossible never tried slamming a revolving door!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      RobJones wrote:

      I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list.

      One way around this is to set a flag variable to true before populating the list, and then set it to false after populating the list. Then in the OnLvnItemchanged() method, don't do anything if the flag variable is equal to true. Make sense?


      "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

      R 1 Reply Last reply
      0
      • D David Crow

        RobJones wrote:

        I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list.

        One way around this is to set a flag variable to true before populating the list, and then set it to false after populating the list. Then in the OnLvnItemchanged() method, don't do anything if the flag variable is equal to true. Make sense?


        "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

        R Offline
        R Offline
        RobJones
        wrote on last edited by
        #3

        Yeah I'll have to set it up that way... I guess I was just wondering if it was possible to set the lvi to a checked state before inserting it into the control. Guess not. Thanks for your help! Rob Whoever said nothing's impossible never tried slamming a revolving door!

        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