SetConsoleScreenBufferInfoEx function
Applies to: desktop apps only
Sets extended information about the specified console screen buffer.
Syntax
BOOL WINAPI SetConsoleScreenBufferInfoEx( __in HANDLE hConsoleOutput, __in PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx );
Parameters
- hConsoleOutput [in]
-
A handle to the console screen buffer. The handle must have the GENERIC_WRITE access right. For more information, see Console Buffer Security and Access Rights.
- lpConsoleScreenBufferInfoEx [in]
-
A CONSOLE_SCREEN_BUFFER_INFOEX structure that contains the console screen buffer information.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/3/2012
Community Content
Blake Coverett
Off by One Bug
The srWindow.Right and srWindow.Bottom fields appear to be exclusive in SetConsoleScreenBufferInfoEx but inclusive in GetConsoleScreenBufferInfoEx, at least on Vista SP1.
Getting the CONSOLE_SCREEN_BUFFER_INFOEX struct and immediately setting it with the same values will shrink your window one character cell in each direction.
Getting the CONSOLE_SCREEN_BUFFER_INFOEX struct and immediately setting it with the same values will shrink your window one character cell in each direction.