Retrieving selected items
Posted
by Zafir Anjum
on August 6th, 1998
To retrieve the index of the first selected item use GetNextItem(). As its name implies, you can use also use the GetNextItem() function to retrieve the index of the next selected item. The code below prints out the indices of all selected items to the debug window.
// This code prints out the indices of selected items to debug win
int i = GetNextItem( -1, LVNI_ALL | LVNI_SELECTED);
while( i != -1 )
{
TRACE("%d\n", i );
i = GetNextItem( i, LVNI_ALL | LVNI_SELECTED);
}

Comments
some modification
Posted by Legacy on 04/21/2002 12:00amOriginally posted by: Alexey Popov
ReplySetItemData Works fine for me with a Dlg
Posted by Legacy on 01/26/2001 12:00amOriginally posted by: David Smulders
ReplyExample did not work; but MSDN solution did
Posted by Legacy on 02/06/2000 12:00amOriginally posted by: Gerard Nicol
ReplySo simple, yet so perfect . . .
Posted by Legacy on 09/15/1999 12:00amOriginally posted by: Andon M. Coleman
Good work yet again, Zafir :)
Reply