git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52055
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ // SM_SWAPBUTTON is not available under CE and it doesn't make sense to ask
+ // for it there
+#ifdef SM_SWAPBUTTON
-1 // wxSYS_DCLICK_MSEC - not available as system metric
};
-1 // wxSYS_DCLICK_MSEC - not available as system metric
};
+ // 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.
BYTE vks = LOBYTE(VkKeyScan(wxk));
if ( vks != 0xff )
// check to see if its one of the OEM key codes.
BYTE vks = LOBYTE(VkKeyScan(wxk));
if ( vks != 0xff )
{
if ( isVirtual )
*isVirtual = false;
{
if ( isVirtual )
*isVirtual = false;
// small helper for wxGetKeyState() and wxGetMouseState()
static inline bool wxIsKeyDown(WXWORD vk)
{
// small helper for wxGetKeyState() and wxGetMouseState()
static inline bool wxIsKeyDown(WXWORD 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)) vk = VK_RBUTTON;
- break;
- case VK_RBUTTON:
- if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_LBUTTON;
- break;
+ if ( ::GetSystemMetrics(SM_SWAPBUTTON) )
+ {
+ if ( vk == VK_LBUTTON )
+ vk = VK_RBUTTON;
+ else // vk == VK_RBUTTON
+ vk = VK_LBUTTON;
+ }
+#endif // SM_SWAPBUTTON
+
// 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
// we only want that one
// 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
// we only want that one