September 4th, 1999, 11:22 PM
vc50 mfc win95/98
I have what I am sure is a simple question. I have a populated ClistCtrl and I want to delete only the selected items. I figured I would traverse through the list and delete the items like so.
int i = GetNextItem( -1, LVNI_SELECTED);
while( i != -1 )
{
DeleteItem( i ) ;
i = GetNextItem( i, LVNI_SELECTED);
}
This does not work. All suggestions welcome and code fragments appreciated.
I have what I am sure is a simple question. I have a populated ClistCtrl and I want to delete only the selected items. I figured I would traverse through the list and delete the items like so.
int i = GetNextItem( -1, LVNI_SELECTED);
while( i != -1 )
{
DeleteItem( i ) ;
i = GetNextItem( i, LVNI_SELECTED);
}
This does not work. All suggestions welcome and code fragments appreciated.