
This function fails if the specified window-corner coordinates exceed the limits of the console screen buffer or the screen. To change the size or location of a screen buffer's window, use the SetConsoleWindowInfo function. This function fails if either dimension of the specified size is less than the corresponding dimension of the console's window. To change a screen buffer's size, use the SetConsoleScreenBufferSize function. This size differs from the maximum window size returned by GetConsoleScreenBufferInfo in that the console screen buffer size is ignored. The GetLargestConsoleWindowSize function returns the maximum size of a console's window based on the current font and screen sizes.

The GetConsoleScreenBufferInfo function returns the following information about a screen buffer and its window:

The dimensions of a screen buffer's window cannot exceed the corresponding dimensions of either the console screen buffer or the maximum window that can fit on the screen based on the current font size (controlled exclusively by the user). For more information, please see our comparison of the classic console functions versus virtual terminal sequences.Ī screen buffer can be any size, limited only by available memory. That content belongs to the terminal and is generally no longer a part of the addressable area.


The terminal handles any scrollback region that would be the equivalent of a console with a screen buffer size larger than its window size. In the virtual terminal sequences world, the size of the window and the size of the screen buffer are fixed to the same value.
