Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CTreeCtrl, Right click

Status
Not open for further replies.

NiceButDim

Programmer
Feb 12, 2002
154
GB
Hi,
I've created a menu for a CTreeCtrl object that pops-up when the user right clicks. When you do the click, the item under the mouse is highlighted although not selected (i.e. *CTreeCtrl->GetSelectedItem doesn't return it). I would like to manually set the currently selected item to be the item under the mouse at the point of right clicking but I don't know how.
I assumed that the info would be held in the NMHDR structure passed to the right click function, but it doesn't appear to be.
Any help would be appeciated.
 
can't you use CTreeCtrl::HitTest() and then set the selection using CTreeCtrl::SelectItem() ???
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top