I don't know if it is possible but I have a CTreeCtrl object with checkboxes and that works fine. The thing is that I don't like the selection in my tree. I already have checkboxes so I do not have to see what item is selected. I tried unselecting the tree item in the OnSelChanged function like this:
But then the selecting and unselecting is noticeable. Is there a way to completely disable the selection functionality of the CTreeCtrl class?Code:void CMyTree::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult) { NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; HTREEITEM hItem = this->GetSelectedItem(); this->SetItemState(hItem, 0, TVIS_SELECTED ); *pResult = 0; }




Reply With Quote