0
votes

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?

1

1 Answers

3
votes

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