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
This commit is contained in:
Julian Smart
2005-04-17 14:49:34 +00:00
parent abcb9fcff0
commit 7d30268cd9

View File

@@ -223,9 +223,12 @@ static void EnsureParentHasControlParentStyle(wxWindow *parent)
// instead // instead
bool GetCursorPosWinCE(POINT* pt) bool GetCursorPosWinCE(POINT* pt)
{ {
DWORD pos = GetMessagePos(); if (!GetCursorPos(pt))
pt->x = LOWORD(pos); {
pt->y = HIWORD(pos); DWORD pos = GetMessagePos();
pt->x = LOWORD(pos);
pt->y = HIWORD(pos);
}
return true; return true;
} }
#endif #endif
@@ -3516,10 +3519,10 @@ bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd),
// specific way (for example, depending on the current position) // specific way (for example, depending on the current position)
POINT pt; POINT pt;
#ifdef __WXWINCE__ #ifdef __WXWINCE__
if ( !::GetCursorPosWinCE(&pt) ) if ( !::GetCursorPosWinCE(&pt))
#else #else
if ( !::GetCursorPos(&pt) ) if ( !::GetCursorPos(&pt) )
#endif #endif
{ {
wxLogLastError(wxT("GetCursorPos")); wxLogLastError(wxT("GetCursorPos"));
} }