Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC CTreeCtrl.
Hello!
I need to get int position or item that highlighted in CTreeCtrl(HIGHLIGHTED!!! not selected, when I will be know which node is highlighted I could select item programatically).
I tried GetNextItem(NULL, TVGN_DROPHILITE)but this didn't help
Thanks a lot
Posted 7-Jan-13 3:15am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I think you want to call
TreeView_GetSelection(handle)
and you need to specify the handle for the control (ie. not NULL).
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Have you tried this CTreeCtrl::GetDropHilightItem[^]
  Permalink  
Comments
thomas_wingfield at 9-Jan-13 9:01am
   
Thanks all a lot for posting.I tried this

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 6,725
1 OriginalGriff 6,696
2 CPallini 5,315
3 George Jonsson 3,589
4 Gihan Liyanage 2,650


Advertise | Privacy | Mobile
Web03 | 2.8.140921.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100