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)) {