I agree with Papa On CTreeCtrl I subclass and then do (almost) the same as below. On CTreeView. void CLeftView::OnLButtonDown(UINT nFlags, CPoint point) { UINT uFlags; HTREEITEM hItem; BOOL bChecked; // let tree control update before getting the check state CTreeView::OnLButtonDown(nFlags, point); hItem = GetTreeCtrl().HitTest(point, &uFlags); if ((hItem != NULL) && (TVHT_ONITEM & uFlags)) { bChecked=GetTreeCtrl().GetCheck(hItem); GetDocument()->UserClicked(hItem,bChecked); } }
B
birdtable
@birdtable