如何在CTreeCtrl中获取突出显示的节点的索引或项目? [英] How get index or item of highlighted node in CTreeCtrl?

查看:118
本文介绍了如何在CTreeCtrl中获取突出显示的节点的索引或项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

我需要获得在CTreeCtrl中突出显示的int位置或项目(突出显示!!!未选中,当我知道哪个节点突出显示时我可以以编程方式选择项目。)

我试过GetNextItem(NULL,TVGN_DROPHILITE)但这没有帮助

非常感谢

解决方案

我想你想调用

 TreeView_GetSelection(handle)

,你需要指定控件的句柄(即非NULL)。


您是否尝试过此 CTreeCtrl :: GetDropHilightItem [ ^ ]

Hello!
I need to get int position or item that highlighted in CTreeCtrl(HIGHLIGHTED!!! not selected, when I will be know which node is highlighted I could select item programatically).
I tried GetNextItem(NULL, TVGN_DROPHILITE)but this didn''t help
Thanks a lot

解决方案

I think you want to call

TreeView_GetSelection(handle)

and you need to specify the handle for the control (ie. not NULL).


Have you tried this CTreeCtrl::GetDropHilightItem[^]


这篇关于如何在CTreeCtrl中获取突出显示的节点的索引或项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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