Fix using RegisterHotKey() with negative IDs in wxMSW.

This was broken due to a wrong cast from WPARAM (i.e. 32 bit unsigned int in
Win32) value containing the ID to WORD (i.e. 16 bit unsigned short) which
truncated the ID value.

Notice that MSDN documents the requirement for the IDs to be positive, but
negative IDs seem to work, at least with Windows 7, after this fix.

Closes #16880.
This commit is contained in:
Vadim Zeitlin 2015-02-25 19:41:58 +01:00
parent 82051979e7
commit 22c76dde06

View File

@ -3283,7 +3283,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
#if wxUSE_HOTKEY
case WM_HOTKEY:
processed = HandleHotKey((WORD)wParam, lParam);
processed = HandleHotKey(wParam, lParam);
break;
#endif // wxUSE_HOTKEY