我尝试创建像资源管理器一样的列表视图项.当我双击它时,我想获得所选项目.
所以我可以使用它来获取路径并找到要显示的文件.我可以通过senddlgmessage在treeview中完成它.但看起来它在listview上不起作用.
Gra*_*ian 16
如果您只是在C++中使用原始ListView控件,则需要执行以下操作:
// Get the first selected item
int iPos = ListView_GetNextItem(hListView, -1, LVNI_SELECTED);
while (iPos != -1) {
// iPos is the index of a selected item
// do whatever you want with it
// Get the next selected item
iPos = ListView_GetNextItem(hListView, iPos, LVNI_SELECTED);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12055 次 |
| 最近记录: |