After quite a few requests, I thought I'd post this tree control that uses a similar selection drawing style to the list control I posted here: ListCtrl - A WTL list control with Windows Vista style item selection. For an added bonus, I've also included support for multiple-selection.
How to Use CTreeCtrl
Simply use the tree control as you would the normal
CTreeViewCtrl, however there are a couple of functions required to activate and retrieve multiple selections:
BOOL bShowThemed = TRUE
Draw item selection themed.
TRUE = Draw themed selection;
FALSE = Classic mode
Turns on/off multiple selection.
TRUE = Turn on multiple
CSimpleArray < HTREEITEM >& aSelectedItems
Retrieves a list of selected tree items.
aSelectedItems - Reference to an array of
Any comments or suggestions are welcome.
- 16th March, 2006: 1.0
- 20th March, 2006: 1.1
- 5th April, 2006: 1.2
- Corrected problems with multiple select and checkboxes - many thanks to Phil C.
Alan has been developing applications for a very long time (~10 years), but he's not bitter about this at all. My main area of expertise is C++. He lives in Sweden with his beautiful wife, daughter and son and enjoys climbing mountains and kayaking in his spare time (which isn't much).