8 const HANDLE conout = openConout();
10 CONSOLE_SCREEN_BUFFER_INFO info = {};
11 BOOL ret = GetConsoleScreenBufferInfo(conout, &info);
12 ASSERT(ret && "GetConsoleScreenBufferInfo failed");
14 trace("cursor=%d,%d", info.dwCursorPosition.X, info.dwCursorPosition.Y);
15 printf("cursor=%d,%d\n", info.dwCursorPosition.X, info.dwCursorPosition.Y);
17 trace("srWindow={L=%d,T=%d,R=%d,B=%d}", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);
18 printf("srWindow={L=%d,T=%d,R=%d,B=%d}\n", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);
20 trace("dwSize=%d,%d", info.dwSize.X, info.dwSize.Y);
21 printf("dwSize=%d,%d\n", info.dwSize.X, info.dwSize.Y);
23 const HWND hwnd = GetConsoleWindow();
26 if (GetWindowRect(hwnd, &r)) {
27 const int w = r.right - r.left;
28 const int h = r.bottom - r.top;
29 trace("hwnd: pos=(%d,%d) size=(%d,%d)", r.left, r.top, w, h);
30 printf("hwnd: pos=(%d,%d) size=(%d,%d)\n", r.left, r.top, w, h);
32 trace("GetWindowRect failed");
33 printf("GetWindowRect failed\n");
36 trace("GetConsoleWindow returned NULL");
37 printf("GetConsoleWindow returned NULL\n");