[INCLUDE][ATL] Fix WM_SETHOTKEY macro wrappers

WM_SETHOTKEY / WM_GETHOTKEY messages encode the hotkey in a different
way than with the WM_HOTKEY message.
For more details, see:
https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-gethotkey
https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-sethotkey

Addendum to commit 6829350af9 (PR #7947)
This commit is contained in:
Hermès Bélusca-Maïto 2025-05-07 23:04:25 +02:00
parent 3bb27eb416
commit f20efc6007
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 12 additions and 12 deletions

View file

@ -1210,7 +1210,7 @@ public:
int SetHotKey(WORD wVirtualKeyCode, WORD wModifiers)
{
ATLASSERT(::IsWindow(m_hWnd));
return ::SendMessage(m_hWnd, WM_SETHOTKEY, MAKEWPARAM(wVirtualKeyCode, wModifiers), 0);
return (int)::SendMessage(m_hWnd, WM_SETHOTKEY, MAKEWORD(wVirtualKeyCode, wModifiers), 0);
}
HICON SetIcon(HICON hIcon, BOOL bBigIcon = TRUE)