CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    14

    How to delete and add a row in CListCtrl

    Dear All:

    My application need to show a bunch of records in a CListView. Since there is memory limitation for a CListView buffer (How big is that ? ), I only show 300 hundreds records at a time. The every record after 300 will be displayed in the list only when the first row of the list is deleted. That means everytime before I add a new row in the end of list of CListView, I want to delete the first record from the list. and then add a new roll at the end of the list of CListView. So the CListView always show 300 latest records.

    Can you tell me that how to implement this ?

    Thanks a lot.


  2. #2
    Join Date
    May 1999
    Posts
    38

    Re: How to delete and add a row in CListCtrl

    Hi,

    Isn't CListCtrl:eleteItem( int nItem ); sufficent?

    It enables you to delete the item number nItem (for example: item number 0, will delete the top item) please notice that if you sort your CListCtrl, your 0 item might be not the first item you inserted.



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