Skip to content

Commit

Permalink
Commented out the console debug printouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko19907 committed Jun 12, 2023
1 parent f931dc7 commit 0aea881
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ConsoleApplication1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ 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);

// 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;
}
}
}
Expand All @@ -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()
Expand Down

0 comments on commit 0aea881

Please sign in to comment.