I am using GetCursorPos(LPPOINT lpPoint) to get the position of the cursor. Then I use ChildWindowFromPoint using the MainFrame. For example
CMainFrame *pMainFrame = (CMainFrame *)AfxGetMainWnd();
CWnd *childWnd = pMainFrame->ChildWindowFromPoint(point);
if (childWnd )
The problem is that childWnd is not return NULL when point is not within a child window. What's the problem?
How can I get the window under the mouse?