From abba1c08895274b25b1d6045e9c6ad8c599b420c Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Thu, 19 Jul 2018 00:10:26 +0200 Subject: [PATCH] send hotkey events to thread's event queue --- windows-snapshot-tool/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows-snapshot-tool/src/main.cpp b/windows-snapshot-tool/src/main.cpp index 8c02b03..36b1813 100644 --- a/windows-snapshot-tool/src/main.cpp +++ b/windows-snapshot-tool/src/main.cpp @@ -69,8 +69,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance, /* register hotkey. 0x59 is 'y' so win+y or print * * see: https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes */ - if (!RegisterHotKey(Hwnd, WM_HOTKEY_FREEZE, MOD_WIN, 0x59) - || !RegisterHotKey(Hwnd, WM_HOTKEY_FREEZE, 0, 0x2c)) { + if (!RegisterHotKey(NULL, WM_HOTKEY_FREEZE, MOD_WIN, 0x59) + || !RegisterHotKey(NULL, WM_HOTKEY_FREEZE, 0, 0x2c)) { FatalAppExit(0, TEXT("Couldn't register hotkey!")); }