CTreeCtrl MFC class: How to allow multiple select? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

CTreeCtrl MFC class: How to allow multiple select?

tly007tly007 Posts: 10Member
I've created a Tree control using CTreeCtrl class but every time I select a different item in the tree the others close. I would like everything to remain expanded even when another item is clicked on to be expanded. MSDN web site indicates that this behavior is default and the programmer could specify the style TVS_SINGLESELECT (or something to that effect) to force only 1 open item at a time. Can anyone advise me on what's wrong?

This is how I'm creating the tree control
...

CTreeCtrl tree;
CRect treeRECT(x,y,width,height);
...

tree.Create(WS_CHILD|WS_VISIBLE|WS_DLGFRAME|TVS_HASLINES|TVS_HASBUTTONS|
TVS_LINESATROOT|TVS_DISABLEDRAGDROP,treeRECT,this,IDC_TREE1);

Thanks in advance.




To my best friend, Coca-Cola: Much love for you. We go way back...

Sign In or Register to comment.