Click to See Complete Forum and Search --> : CListCtrl - Marking a row for deletion


David Flores
May 19th, 1999, 09:28 AM
Hello All,
In my CListCtrl I want to be able to "mark" any row for future deletion, by displaying them with a greyed-out font color. I have the code to loop through and determine which rows are highlight i.e. to be mark. But I don't know how to mark them? Is there some type of disable flag (or other flag) I can set? I tried using the lParam flag, but it doesn't seem to work. Any help would be greatful.

David

Dan Ramage
May 19th, 1999, 03:50 PM
Hey David,
What I did was use the CListCtrl::SetItemData function to add a flag for deletion, or any other action.
I basically do a item_flags = CListCtrl::GetItemData( row ) call to get any other flags I may have set, and then when the time comes to update the list control
I go through each item ndx calling the GetItemData and deleting the row if necessary.

Hope this helps.

Dan