CTreeCtrl: How to find first item
I want to get the very first item in my tree control. Is there a function for getting it? Not the first visible one, the first actual node in the tree, visible or not.
Right now I wrote a function to do this, but it requires an item to be selected in the tree. I want to know the real solution to this so I can know for sure that this function will never fail... or at least 1 time in a million!
Thanks
Re: CTreeCtrl: How to find first item
Well...try it with CTreeCtrl::GetRootItem().
It returns a HTREEITEM which is the very first item in the tree.
You can get the first child of the root item via myTreeCtrl.GetChildItem (myTreeCtrl.GetRootItem());
That's all.
bye Torsten.