Link to home
Start Free TrialLog in
Avatar of psen
psen

asked on

CTreeCtrl - highlighting an item

I want to programatically highlight an item in a tree control. I can select it no problem using m_ctlTree.Select( hSelected, TVGN_CARET ) - this expands nodes to display the item, but it is not highlighted. I also tried SetItemState with TVIS_SELECTED but this did nothing.
Avatar of ohell
ohell

Select() should normally highlight the item, but you might have the focus on some other control....try setting the focus to the tree control before calling Select()  
Avatar of psen

ASKER

Thanks for the speedy response - is there any way I can highlight an item without setting focus to the tree - the control is not enabled at this point.
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial