Platform SDK: Files and I/O |
The SetConsoleActiveScreenBuffer function sets the specified screen buffer to be the currently displayed console screen buffer.
BOOL SetConsoleActiveScreenBuffer( HANDLE hConsoleOutput // handle to screen buffer );
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.
A console can have multiple screen buffers. SetConsoleActiveScreenBuffer determines which one is displayed. You can write to an inactive screen buffer and then use SetConsoleActiveScreenBuffer to display the buffer's contents.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Wincon.h; include Windows.h.
Library: Use Kernel32.lib.
Consoles and Character-Mode Support Overview, Console Functions, CreateConsoleScreenBuffer