How to retrieve items in a multi selection CListView
IS there a more efficient way to retrieve the items selected other then having to iterate through the entire list and checking if the item has been selected or not like the following:
Code:
for (int nItem = 0; nItem < m_refListCtrl.GetItemCount(); )
{
if (m_refListCtrl.GetItemState(nItem, LVIS_SELECTED) == LVIS_SELECTED)
{
// do something
}
++nItem;
}
Re: How to retrieve items in a multi selection CListView
GetFirstSelectedItemPosition()
GetNextSelectedItem();
Re: How to retrieve items in a multi selection CListView
Quote:
Originally Posted by
GCDEF
GetFirstSelectedItemPosition()
GetNextSelectedItem();
Thanks GCDEF. That did the trick. Best Wishes.