-
May 28th, 2009, 11:55 AM
#1
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;
}
-
May 28th, 2009, 12:01 PM
#2
Re: How to retrieve items in a multi selection CListView
GetFirstSelectedItemPosition()
GetNextSelectedItem();
-
May 28th, 2009, 12:17 PM
#3
Re: How to retrieve items in a multi selection CListView
Originally Posted by GCDEF
GetFirstSelectedItemPosition()
GetNextSelectedItem();
Thanks GCDEF. That did the trick. Best Wishes.
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
|