Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.