|
-
April 15th, 1999, 10:19 PM
#1
deleting list items
How do you delete a selected list item?
-
April 15th, 1999, 11:46 PM
#2
Re: deleting list items
If we're talking about a CListCtrl, then the following will do it:
POSITION pos;
int iCount;
pos = m_ListCtrl.GetFirstSelectedItemPosition();
while (pos)
{
iCount = m_ListCtrl.GetNextSelectedItem(pos);
m_ListCtrl.DeleteItem(iCount);
}
Just remember that if you are doing a multiple delete, then you should delete in reverse order since the index numbers change after every delete.
Eddie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|