About MFC Tree Control
-
-
Hello~ I make a program about tree control. I want to muli-select of my tree control items. When I get an item name, how could I highlight the item on tree control. I have no ideal about these two problems. Can anyone give me a hand please? Thanks a lot.:)
CTreeCtrl doesn't handle multiple selections. Have a look at CTreeCtrlEx at http://www.techsoft.no/bendik/[^] I use this in some parts of ED (see sig) as well as my own custom tree control (see the ED ClassView). Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
CTreeCtrl doesn't handle multiple selections. Have a look at CTreeCtrlEx at http://www.techsoft.no/bendik/[^] I use this in some parts of ED (see sig) as well as my own custom tree control (see the ED ClassView). Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
Thanks for your help. Does anyone do me a favor for my question2: When I get an item name, how could I highlight the item on tree control. I had tried SetCheck function. But it could not hightlight the item what I give.
qweas wrote: I had tried SetCheck function. But it could not hightlight the item what I give. You need to "select" the item: CTreeCtrl::Select(HTREEITEM hItem, UINT nCode) eg.
Select( hItem, TVGN_CARET );
See the CTreeCtrl documentation. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com