From ab3eae34ccadf90d4af3d8ecff333c8f07eafe18 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Jun 2006 23:55:40 +0000 Subject: [PATCH] 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 --- src/msw/window.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 0e3e576eb6..4e8e3fe884 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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. -- 2.45.2