如何在cgridctrl中获取所选项? [英] How to get selected items in cgridctrl?

查看:239
本文介绍了如何在cgridctrl中获取所选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在CGridCtrl中选择了多个项目。



如何遍历每个选中的项目项目?



在clistctrl中我们可以通过以下代码实现这一点。



POSITION pos = plctrl-> ; GetFirstSelectedItemPosition();

if(pos!= NULL)

{

while(pos)

{

int nItem = plctrl-> GetNextSelectedItem(pos);

}

}



在CGridCtrl中如何实现这个目标?



我尝试过:



我探索但无法得到解决方案。

解决方案

参见如何获取cgridctrl中的项目数? [ ^ ],也许是rerea d CGridCtrl with Merge Cell and Freeze Row / Col Capability [ ^ ]

Hi,

I selected multiple items in CGridCtrl.

How to loop through each selected items?

In clistctrl we can achieve this through below code.

POSITION pos = plctrl->GetFirstSelectedItemPosition();
if (pos != NULL)
{
while (pos)
{
int nItem = plctrl->GetNextSelectedItem(pos);
}
}

In CGridCtrl how to achieve this?

What I have tried:

I explored but couldn't get the solution.

解决方案

See How to get number of items in cgridctrl?[^], and perhaps reread CGridCtrl with Merge Cell and Freeze Row/Col Capability[^]


这篇关于如何在cgridctrl中获取所选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆