1 #define _WIN32_WINNT 0x0501
5 #include "../src/shared/DebugClient.cc"
7 const int SC_CONSOLE_MARK = 0xFFF2;
8 const int SC_CONSOLE_SELECT_ALL = 0xFFF5;
10 CALLBACK DWORD pausingThread(LPVOID dummy)
12 HWND hwnd = GetConsoleWindow();
14 SendMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_SELECT_ALL, 0);
16 SendMessage(hwnd, WM_CHAR, 27, 0x00010001);
23 HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
24 CONSOLE_SCREEN_BUFFER_INFO info;
26 GetConsoleScreenBufferInfo(out, &info);
27 COORD initial = info.dwCursorPosition;
33 for (int i = 0; i < 30; ++i) {
35 GetConsoleScreenBufferInfo(out, &info);
36 if (memcmp(&info.dwCursorPosition, &initial, sizeof(COORD)) != 0) {
37 trace("cursor moved to [%d,%d]",
38 info.dwCursorPosition.X,
39 info.dwCursorPosition.Y);
41 trace("cursor in expected position");