fix wxFindWindowAtPoint for radiobox buttons, it didn't return the radiobox when mouse was clicked inside it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-06-12 23:55:40 +00:00
parent 38d4ee871b
commit ab3eae34cc

View File

@@ -6243,18 +6243,10 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
POINT pt2;
pt2.x = pt.x;
pt2.y = pt.y;
HWND hWndHit = ::WindowFromPoint(pt2);
wxWindow* win = wxFindWinFromHandle((WXHWND) hWndHit) ;
HWND hWnd = hWndHit;
HWND hWnd = ::WindowFromPoint(pt2);
// Try to find a window with a wxWindow associated with it
while (!win && (hWnd != 0))
{
hWnd = ::GetParent(hWnd);
win = wxFindWinFromHandle((WXHWND) hWnd) ;
}
return win;
return wxGetWindowFromHWND((WXHWND)hWnd);
}
// Get the current mouse position.