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