-
November 7th, 2011, 06:17 PM
#1
How to make multiple selections from a tree control?
I would like to be able to sweep the mouse cursor down over a 'simple' CTreeCtrl list in order to capture the text therein. Something analogous to a CListCtrl, where separate items could be selected using the [Ctrl] - mousel click and contiguous items could be selected using the [Shfit]-DownArrow, etc.
I know this can be done because I've seen it in another app. But how to do it. Must be some means of modifying the control style or subclassing the control.
Any suggestions (other than 'why don't you just use a CListCtrl') most welcome.
Here's a starting point demo. I found this. It works but the code is a bit difficult to follow at first glance.
A multi-select tree control class
By The Chard July 25, 1999
http://www.codeguru.com/cpp/controls...ticle.php/c629
Last edited by Mike Pliam; November 7th, 2011 at 08:27 PM.
mpliam
-
November 8th, 2011, 02:47 AM
#2
Re: How to make multiple selections from a tree control?
There is no "built-in" functionality for a multi select tree control in MS-Windows.
Subclassing a tree control is a possibility, but it is still much work to do.
Maybe this is helpful: http://www.codeproject.com/KB/tree/M..._Treeview.aspx.
Regards
PA
-
November 8th, 2011, 12:31 PM
#3
Re: How to make multiple selections from a tree control?
Tree-View Control Window Styles
TVS_CHECKBOXES is what you need.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|