CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Location
    Sofia, Bulgaria
    Posts
    1

    How can I get the count of child item in CTreeCtrl






    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)

  2. #2
    Join Date
    Apr 1999
    Posts
    191

    Brute force



    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured