6 void dumpInfoToTrace() {
7 CONSOLE_SCREEN_BUFFER_INFO info;
8 assert(GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info));
9 trace("win=(%d,%d,%d,%d)",
10 (int)info.srWindow.Left,
11 (int)info.srWindow.Top,
12 (int)info.srWindow.Right,
13 (int)info.srWindow.Bottom);
18 (int)info.dwCursorPosition.X,
19 (int)info.dwCursorPosition.Y);
22 int main(int argc, char *argv[]) {
24 startChildProcess(L"CHILD");
28 setWindowPos(0, 0, 1, 1);
31 // Reducing the buffer height can move the window up.
32 setBufferSize(80, 25);
33 setWindowPos(0, 20, 80, 5);
35 setBufferSize(80, 10);
39 // Reducing the buffer height moves the window up and the buffer
41 setBufferSize(80, 25);
42 setWindowPos(0, 20, 80, 5);
44 printf("TEST1\nTEST2\nTEST3\nTEST4\n");
47 setBufferSize(80, 10);
51 // Reducing the buffer width can move the window left.
52 setBufferSize(80, 25);
53 setWindowPos(40, 0, 40, 25);
55 setBufferSize(60, 25);
59 // Sometimes the buffer contents are shifted up; sometimes they're
60 // shifted down. It seems to depend on the cursor position?
62 // setBufferSize(80, 25);
63 // setWindowPos(0, 20, 80, 5);
64 // setCursorPos(0, 20);
65 // printf("TESTa\nTESTb\nTESTc\nTESTd\nTESTe");
67 // setCursorPos(0, 0);
68 // printf("TEST1\nTEST2\nTEST3\nTEST4\nTEST5");
70 // setCursorPos(0, 24);
72 // setBufferSize(80, 24);
74 setBufferSize(80, 20);
75 setWindowPos(0, 10, 80, 10);
78 printf("TEST1\nTEST2");
83 setBufferSize(80, 18);