CListCtrl - how to enable multiple selection

本秂侑毒 提交于 2019-12-24 10:11:31

问题


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?


回答1:


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

list.ModifyStyle(LVS_SINGLESEL, 0);




回答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.



来源:https://stackoverflow.com/questions/464675/clistctrl-how-to-enable-multiple-selection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!