如何从WTL中的一个ListViewCtrl多个选择项目? [英] How to get items from a ListViewCtrl multiple selection in WTL?
本文介绍了如何从WTL中的一个ListViewCtrl多个选择项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 WTL 程序有一个 ListViewCtrl
。
我需要由用户选择(多选)的项目。
I need to get the items selected by the user(multiple selection).
我只能用焦虑不安选定项的计数 GetSelectedCount()
。
I can only het the count of selected items using GetSelectedCount()
.
GetSelectedItem()
犯规多的选择工作。
GetSelectedItem()
doesnt work with multiple selection.
推荐答案
看看这里:
CListViewCtrl ListView = ...
for(INT nItem = ListView.GetNextItem(-1, LVNI_SELECTED); nItem >= 0; nItem = ListView.GetNextItem(nItem, LVNI_SELECTED))
{
// Here you go with nItem
}
这篇关于如何从WTL中的一个ListViewCtrl多个选择项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文