From 88970f644e598c2a946f19be46dc29d04eecc834 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Thu, 19 Jul 2018 00:01:21 +0200 Subject: [PATCH] try to make hotkey work? --- windows-snapshot-tool/src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/windows-snapshot-tool/src/main.cpp b/windows-snapshot-tool/src/main.cpp index 0c052cc..8c02b03 100644 --- a/windows-snapshot-tool/src/main.cpp +++ b/windows-snapshot-tool/src/main.cpp @@ -66,8 +66,6 @@ int WINAPI WinMain (HINSTANCE hThisInstance, ); /*Initialize the NOTIFYICONDATA structure only once*/ InitNotifyIconData(); - /* Make the window visible on the screen */ - ShowWindow (Hwnd, nCmdShow); /* register hotkey. 0x59 is 'y' so win+y or print * * see: https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes */ @@ -76,6 +74,9 @@ int WINAPI WinMain (HINSTANCE hThisInstance, FatalAppExit(0, TEXT("Couldn't register hotkey!")); } + /* Make the window visible on the screen */ + ShowWindow (Hwnd, nCmdShow); + /* Run the message loop. It will run until GetMessage() returns 0 */ while (GetMessage (&messages, NULL, 0, 0)) {