Click to See Complete Forum and Search --> : How can I get the count of child item in CTreeCtrl


orion
March 30th, 1999, 07:46 AM
When user selected an item in the tree view control, How could I get the count of child items attarched to the item which user selected?


HTREEITEM hUserSelectItem = m_TreeCtrl.GetSelectdItem();



What's the next step?!


HTREEITEM contained the child information of an item?!


By the way, where can I look for about the information of HTREEITEM ?!

( On-lin Help??? Oh.......poor)

Bore
March 30th, 1999, 07:55 AM
I don't think there's a call to count child items. You'll have to implement your own function using CTreeCtrl::ItemHasChildren(), CTreeCtrl::GetChildItem(), and CTreeCtrl::GetNextSiblingItem(). Actually, the online help for CTreeCtrl is pretty thorough.