weird mouse position from the NMHDR param
Posted on 1998-08-13
I have the following function :
void CEditorExeDlg::OnItemexpandingSectionTree(NMHDR* pNMHDR, LRESULT* pResult)
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
POINT ptExpand = pNMTreeView->ptDrag;
CTreeCtrl *pTree = (CTreeCtrl *) GetDlgItem(IDC_SECTION_TREE);
// Make a HitTest to get the current expanding item
HitTestInfo.pt = ptExpand;
HTREEITEM hTest = pTree->HitTest(&HitTestInfo);
when I debug the app, the coordinates in the pNMTreeView->ptDrag have no sense at all. I need this to get the item that was clicked in an tree list. upon expanding the upper left element of the list, the value of the point is something like (1234567, 12345678) (some huge values). Of course, after the hittest, the flag is set to below & right.
What may be the cause of this problem?