diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2680a55bcd..6a4d9c2250 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4408,7 +4408,8 @@ wxWindow* wxFindWindowAtPointer(wxPoint& pt) // Get the current mouse position. wxPoint wxGetMousePosition() { - extern MSG s_currentMsg; - return wxPoint(s_currentMsg.pt.x, s_currentMsg.pt.y); + POINT pt; + GetCursorPos( & pt ); + return wxPoint(pt.x, pt.y); }