Selection in tree with right mouse button
Hi !
// I have a CTreeCtrl class where I would like to be able to make selections
with the right
// mouse button in the same way it is done with the left button.
// I have tried to do this by calling OnLButtonDown(nFlags, point) from the
// OnRButtonDown-handler but this dosn't seem to do the trick.
you can use the follwing within your OnRButtonDown() handler:
OnRButtonDown(UINT uFlags, CPoint point)
{
...
if(hItem = GetTreeCtrl().HitTest(point, &uFlags))
GetTreeCtrl().SelectItem(hItem);
...
Quote:
}
Hope this helps !
Regards,
Hans Pesata