Tree Control
-
Hi all! How do we know what branch of the tree (CTreeCtrl) is clicked on. Thank You Vu vucsuf
Can this help?
void CMyTreeCtrl::OnRightClick(NMHDR* /*pNMHDR*/, LRESULT* pResult)
{
CPoint point(GetMessagePos());
ScreenToClient(&point);
HTREEITEM hItem = HitTest(point, &nFlags);
//...
}Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)
-
Can this help?
void CMyTreeCtrl::OnRightClick(NMHDR* /*pNMHDR*/, LRESULT* pResult)
{
CPoint point(GetMessagePos());
ScreenToClient(&point);
HTREEITEM hItem = HitTest(point, &nFlags);
//...
}Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)
-
Can this help?
void CMyTreeCtrl::OnRightClick(NMHDR* /*pNMHDR*/, LRESULT* pResult)
{
CPoint point(GetMessagePos());
ScreenToClient(&point);
HTREEITEM hItem = HitTest(point, &nFlags);
//...
}Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)
-
Not really, I`m looking more for a straight conversion from a CString class to a CPoint class if its possible, by thanks for taking to the time to have a go, I appreciate that Paolo. Alan. AEGC
I'm not sure of what you're trying to do, but if you want to know where an item is, just call GetItemRect(). Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)