From 0aea881c0f0a75b92ba08d77a8ed9d823fe8e2a9 Mon Sep 17 00:00:00 2001 From: Marko19907 Date: Mon, 12 Jun 2023 12:49:28 +0200 Subject: [PATCH] Commented out the console debug printouts --- ConsoleApplication1.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ConsoleApplication1.cpp b/ConsoleApplication1.cpp index e8da7d5..c7920d0 100644 --- a/ConsoleApplication1.cpp +++ b/ConsoleApplication1.cpp @@ -76,8 +76,8 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) randomY = min(randomY, monitorInfo.rcMonitor.bottom - windowHeight - taskbarHeight); } - std::cout << "Taskbar hidden: " << (isTaskbarAutoHidden() ? "true" : "false") << "\n"; - std::cout << "Taskbar height: " << getTaskbarHeight() << "px \n"; + // std::cout << "Taskbar hidden: " << (isTaskbarAutoHidden() ? "true" : "false") << "\n"; + // std::cout << "Taskbar height: " << getTaskbarHeight() << "px \n"; // Move the window to the random position SetWindowPos(hWnd, HWND_TOP, randomX, randomY, 0, 0, SWP_NOSIZE | SWP_NOZORDER); @@ -85,7 +85,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) // Animate the window movement if (!AnimateWindow(hWnd, 4000, AW_CENTER)) { - std::cerr << "Failed to animate window movement: " << GetLastError() << std::endl; + // std::cerr << "Failed to animate window movement: " << GetLastError() << std::endl; } } } @@ -99,6 +99,7 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { // Enumerate all windows and move non-maximized ones EnumWindows(EnumWindowsProc, 0); + std::cout << "Moved all non-maximized windows at " << dwTime << std::endl; } int main()