From 7d30268cd974c4cb2fce4cc35b741fb5e0a1a75d Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 17 Apr 2005 14:49:34 +0000 Subject: [PATCH] Use GetCursorPos on WinCE wherever possible (otherwise the wrong cursor is shown) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 76b0b095ed..1193761843 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -223,9 +223,12 @@ static void EnsureParentHasControlParentStyle(wxWindow *parent) // instead bool GetCursorPosWinCE(POINT* pt) { - DWORD pos = GetMessagePos(); - pt->x = LOWORD(pos); - pt->y = HIWORD(pos); + if (!GetCursorPos(pt)) + { + DWORD pos = GetMessagePos(); + pt->x = LOWORD(pos); + pt->y = HIWORD(pos); + } return true; } #endif @@ -3516,10 +3519,10 @@ bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd), // specific way (for example, depending on the current position) POINT pt; #ifdef __WXWINCE__ - if ( !::GetCursorPosWinCE(&pt) ) + if ( !::GetCursorPosWinCE(&pt)) #else if ( !::GetCursorPos(&pt) ) -#endif +#endif { wxLogLastError(wxT("GetCursorPos")); } -- 2.45.2