Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using tree controls in my software. If I use a node to select all the child elements, they are all selected. If I do the same for the next node down, all of child elements are selected for the second node. All of the child elements in the first node stay selected EXCEPT the last one, which gets unselected for some reason. This only happens if you do things top-down.
It also seems to be ok in Windows XP, so it may be OS related.

Any suggestions would be appreciated.

Thanks.

Jim.

C++
BOOL bIsClickedItemSelected = GetItemState( hClickedItem, TVIS_SELECTED ) & TVIS_SELECTED;

// Select the clicked item
SelectItem( hClickedItem );

The call to SelectItem is highlighting the new node, and unhighlighting the final child element of the previous one.
Posted
Updated 27-Aug-15 0:49am
v4
Comments
Sergey Alexandrovich Kryukov 26-Aug-15 12:19pm    
How about a code sample?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900