Question

I need to implement TreeList control same as in Process Explorer. I am quite newbie in GUI and did not write such complicated controls.

As I see in Process Explorer, there is a TreeListWindowClass, which contains children: 2 headers, 3 scrollbars (one of them is invisible?) and 1 static (place between visible scrollbars). As I understand, main control draws all items inside itself. Also I did not found mfcxxx.dll in attached dlls.

Question 1: what framework it’s better to use? There are: MFC, WTL, plain WinAPI … I took a look at this implementation http://www.codeguru.com/cpp/controls/treeview/classes/article.php/c13167 and was confused with > 8000 lines of code in cpp file with huge structures (one of them contains 80 members). It is plain WinAPI (and C without ++). I definitely want to use OOP style. =)

Question 2: What is the high-level design of this control should be? Can you explain without deep details how does this control should be designed?

My limitations: C++, VS10, OS: Vista and higher.

Thanks in advance

Was it helpful?

Solution

I did this recently and used the Multi-Column Tree View from http://www.mimec.org/articles/mfc/mctree

Screenshot of Multi-Column Tree View

It is fairly basic, but it met my needs and is fairly compact. It provides a CColumnTreeView class which is a sub-class of CView - so it works correctly with the standard CDocument/CView pattern of MFC.

OTHER TIPS

You can find the exact equivalent of Process Explorer's "Tree List View" from Process Hacker's source (which is a lot better IMHO.)

Qt is a library that offers a fully functioning QTreeWidget that looks like it meets the requirements of your program.
enter image description here

DevExpress has some excellent treelist controls, however they are written in C#. However you can target them using C++/CLI, or managed C++. So I'm not sure if you are able to make your app managed. So perhaps it might not be so helpful.

As for free treelist controls, I try to stay away from them, due to bugs, and lack of support.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top