CListCtrl and Selection...
-
In my program i use a CListCtrl.. Selecting multiple Items.. everything is ok.. but after processing the selection i would like to destroy the selection the user made.. visually it is simple, using SetSelectionMark(-1)... but msdn says: "This macro does not affect the selection state of the item" and this is the problem.. the user clicks "process" once again.. and the same selection gets processed... but i want to delete the section.. the only solution i found would be setting the "ItemState" to NonSelected.. but i had to do this for the whole selection.. is there any other / easier way?? thanks in advance bernhard stolen sig#19: "Just looking for loopholes." W. C. Fields [American actor, 1880-1946, explaining why he was reading the Bible on his deathbed.]
-
In my program i use a CListCtrl.. Selecting multiple Items.. everything is ok.. but after processing the selection i would like to destroy the selection the user made.. visually it is simple, using SetSelectionMark(-1)... but msdn says: "This macro does not affect the selection state of the item" and this is the problem.. the user clicks "process" once again.. and the same selection gets processed... but i want to delete the section.. the only solution i found would be setting the "ItemState" to NonSelected.. but i had to do this for the whole selection.. is there any other / easier way?? thanks in advance bernhard stolen sig#19: "Just looking for loopholes." W. C. Fields [American actor, 1880-1946, explaining why he was reading the Bible on his deathbed.]
Well if you are doing the processing in a loop then you could just set the ItemState to Nonselected as soon as you are done processing that item and then when all processing is done set the selection mark to -1. Bret Faller Odyssey Computing, Inc.
-
In my program i use a CListCtrl.. Selecting multiple Items.. everything is ok.. but after processing the selection i would like to destroy the selection the user made.. visually it is simple, using SetSelectionMark(-1)... but msdn says: "This macro does not affect the selection state of the item" and this is the problem.. the user clicks "process" once again.. and the same selection gets processed... but i want to delete the section.. the only solution i found would be setting the "ItemState" to NonSelected.. but i had to do this for the whole selection.. is there any other / easier way?? thanks in advance bernhard stolen sig#19: "Just looking for loopholes." W. C. Fields [American actor, 1880-1946, explaining why he was reading the Bible on his deathbed.]
ListView_SetItemState ( hwndYourList, -1, LVIS_SELECTED, 0 ); turns off the selected state for all items in the list. --Mike-- http://home.inreach.com/mdunn/ "Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent :love: your :bob: with :vegemite: and :beer: