BOOL SetConsoleScreenBufferSize(hConsoleOutput, coordSize) | |||||
HANDLE hConsoleOutput; | /* identifies screen buffer to re-size | */ | |||
COORD coordSize; | /* new size in character rows and cols | */ |
The SetConsoleScreenBufferSize function changes the size of the screen buffer for the specified console.
hConsoleOutput
Specifies an open handle with GENERIC_WRITE access to a console screen buffer.
coordSize
Specifies a COORD structure containing the new size of the screen buffer in rows and columns. The new screen buffer size must not allow the the window region to extend beyond the edges of the screen buffer.
The COORD structure has the following format:
typedef struct _COORD { /* coord */
SHORT X; /* horizontal coordinate */
SHORT Y; /* vertical coordinate */
} COORD, *PCOORD;
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
SetConsoleWindowInfo, GetConsoleScreenBufferInfo