X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1772ead05876c9139b9ecbe4559a813a315cb3cd..bbda1088f7995eec084f450141d1071052473106:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 6a4d9c2250..c7b28bac0b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4389,9 +4389,15 @@ static TEXTMETRIC wxGetTextMetrics(const wxWindow *win) // position. wxWindow* wxFindWindowAtPointer(wxPoint& pt) { - // Use current message to find last mouse position - extern MSG s_currentMsg; - HWND hWndHit = ::WindowFromPoint(s_currentMsg.pt); + return wxFindWindowAtPoint(wxGetMousePosition()); +} + +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;