restore checks for SM_SWAPBUTTON, it is not defined in WinCE SDK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -377,7 +377,13 @@ static const int gs_metricsMap[] =
|
|||||||
#else
|
#else
|
||||||
-1,
|
-1,
|
||||||
#endif
|
#endif
|
||||||
|
// SM_SWAPBUTTON is not available under CE and it doesn't make sense to ask
|
||||||
|
// for it there
|
||||||
|
#ifdef SM_SWAPBUTTON
|
||||||
SM_SWAPBUTTON,
|
SM_SWAPBUTTON,
|
||||||
|
#else
|
||||||
|
-1,
|
||||||
|
#endif
|
||||||
-1 // wxSYS_DCLICK_MSEC - not available as system metric
|
-1 // wxSYS_DCLICK_MSEC - not available as system metric
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -6084,6 +6084,9 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
// no VkKeyScan() under CE unfortunately, we need to test how does
|
||||||
|
// it handle OEM keys
|
||||||
|
#ifndef __WXWINCE__
|
||||||
// check to see if its one of the OEM key codes.
|
// check to see if its one of the OEM key codes.
|
||||||
BYTE vks = LOBYTE(VkKeyScan(wxk));
|
BYTE vks = LOBYTE(VkKeyScan(wxk));
|
||||||
if ( vks != 0xff )
|
if ( vks != 0xff )
|
||||||
@@ -6091,6 +6094,7 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
|
|||||||
vk = vks;
|
vk = vks;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif // !__WXWINCE__
|
||||||
{
|
{
|
||||||
if ( isVirtual )
|
if ( isVirtual )
|
||||||
*isVirtual = false;
|
*isVirtual = false;
|
||||||
@@ -6104,15 +6108,20 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
|
|||||||
// small helper for wxGetKeyState() and wxGetMouseState()
|
// small helper for wxGetKeyState() and wxGetMouseState()
|
||||||
static inline bool wxIsKeyDown(WXWORD vk)
|
static inline bool wxIsKeyDown(WXWORD vk)
|
||||||
{
|
{
|
||||||
switch (vk)
|
// SM_SWAPBUTTON is not available under CE, so don't swap buttons there
|
||||||
|
#ifdef SM_SWAPBUTTON
|
||||||
|
if ( vk == VK_LBUTTON || vk == VK_RBUTTON )
|
||||||
{
|
{
|
||||||
case VK_LBUTTON:
|
if ( ::GetSystemMetrics(SM_SWAPBUTTON) )
|
||||||
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON;
|
{
|
||||||
break;
|
if ( vk == VK_LBUTTON )
|
||||||
case VK_RBUTTON:
|
vk = VK_RBUTTON;
|
||||||
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_LBUTTON;
|
else // vk == VK_RBUTTON
|
||||||
break;
|
vk = VK_LBUTTON;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endif // SM_SWAPBUTTON
|
||||||
|
|
||||||
// the low order bit indicates whether the key was pressed since the last
|
// the low order bit indicates whether the key was pressed since the last
|
||||||
// call and the high order one indicates whether it is down right now and
|
// call and the high order one indicates whether it is down right now and
|
||||||
// we only want that one
|
// we only want that one
|
||||||
|
Reference in New Issue
Block a user