From 22c76dde0693de8308fd5a9761cb9c31eec30df8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 25 Feb 2015 19:41:58 +0100 Subject: [PATCH] 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. --- src/msw/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 62e5879935..cbd6137337 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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