I have been working with an MFC CTree control . It seemed at first that I was only able to add the root to the structure.
Well, it turns out I was coding the CTree control correctly. Sort of. The control displays the root of the tree and the user has to click on it to show the nodes underneath.
So the question now is this. How do I code the CTree control so that it comes up initially with all the nodes showing?
What I suspect I need to do is to set the focus on the node I add as I add it. How is this done?
Visual C++ MFC CTree control
Moderator: MaxCoderz Staff
- benryves
- Maxcoderz Staff
- Posts: 3087
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I assume you mean that the root node defaults to being collapsed, in which case CTreeCtrl::Expand looks like it'll do the trick.