Tutorial :CListCtrl - how to enable multiple selection



Question:

I am creating a MFC application for Windows Mobile and don't know how to enable multiple selection for List Control (CListCtrl). In properties panel Single Selection is set to False but still can't select multiple items.

Any idea?


Solution:1

I have never targeted Windows Mobile but you might try the following:

list.ModifyStyle(LVS_SINGLESEL, 0);


Solution:2

ModifyStyle method of CWnd base will work (see post from Diego) if you desire to do this programmatically OR you can define the attribute within the Resource Editor IF your placing the control on a dialog.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »