CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    Rochester, NY USA
    Posts
    65

    CListCtrl - Marking a row for deletion

    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


  2. #2
    Join Date
    May 1999
    Posts
    45

    Re: CListCtrl - Marking a row for deletion

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured