Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to change root item of CMFCShellTreeCtrl?
Posted

1 solution

hi,
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.
 
Share this answer
 
Comments
무명 30-Aug-14 13:17pm    
Thank you very much for the answer!
Because of the work I now saw the answer. I'm sorry.
(Using Google Translate, please understand grammar.)
The following is exactly what I want.

Change the path of the root item.
Soon, this will change the starting point of the tree control.

For example.

A
      B
           C
                D

->

C
      D

Replace C to start the path to the root item.
Then A, B is not visible.

What should I do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900