CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CTreeView?

  1. #1
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    33

    CTreeView?

    Just wondering if anyone understands how CTreeView is actually implemented. When you look at the source code, the GetTreeCtrl() function just returns a pointer to itself (CTreeView). If you follow the inheritance chain, you will find that no-where does it inherit from CTreeCtrl. Can anyone shed any light?

    thanks


  2. #2
    Join Date
    Apr 1999
    Posts
    23

    Re: CTreeView?


    CTreeView::GetTreeCtrl() returns a reference to a CTreeCtrl and not a CTreeView.
    The CTreeCtrl is the wrapper that sets onto of the API TreeCtrl.

    So you can access the TreeCtrl and add an Item like so
    CTreeCtrl &Tree = CTreeView::GetTreeCtrl();
    Tree.InsertItem("New Item added");



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