如何修改CMFCShellTreeCtrl的根项? [英] How to change root item of CMFCShellTreeCtrl?

查看:110
本文介绍了如何修改CMFCShellTreeCtrl的根项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改CMFCShellTreeCtrl的根项目?

How to change root item of CMFCShellTreeCtrl?

推荐答案

hi,

CMFCShellTreeCtrl派生自CTreeCtrl。因此技术将是相同的。

这里 [ ^ ]是CTreeCtrl提供的所有功能的列表。

要更改节点,您需要获取树的该节点的句柄。

例如,如果您拥有树的任何节点的句柄,那么使用CTreeCtrl :: GetParentItem

()您可以获得其父级的句柄并检查它是否是父级。如果那个父项是根项,那么你可以更改它的测试标签等。



我希望这会有所帮助。

请告诉您所有已经尝试过的内容以及您遇到的问题,以便我可以进一步为您提供帮助。

CMFCShellTreeCtrl is derived from CTreeCtrl. So the technique will be same.
Here[^] is a list of all functions provided by CTreeCtrl.
To change a node, you need to get a handle to that node of the tree.
For example, if you have the handle of any node of the tree, then using CTreeCtrl::GetParentItem
() you can get handle to its parent and check if that is the parent or not. If that parent item is the root item, then you can make changes to it like changing its test label etc.

I hope this helps.
Please tell what all you have already tried and where you are stuck so that i can further help you.


这篇关于如何修改CMFCShellTreeCtrl的根项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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