tags:

views:

262

answers:

1

Hi all,

I have a list view control which at the moment only allows one item to be selected. I then read this via the following code:

void CApp::OnNMClickList1(NMHDR *pNMHDR, LRESULT *pResult) { int nSelected = (m_List.GetSelectionMark()); ...

However, now I want to make this list able to multiselect, GetSelectionMark() always returns one index. Can anyone help me recode this to return a list of selected indexes?

+2  A: 

Use GetFirstSelectedItemPosition() to find first selected item, then GetNextSelectedItem() for the rest and you're done. :)

macbirdie
Just saw those on the MSDN, if anyone is interested, I will post the full bit of code.
Konrad