title | description | author | ms.author | ms.topic | keywords | f1_keywords | MS-HAID | MSHAttr | ms.assetid | topic_type | api_name | api_location | api_type | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SetConsoleActiveScreenBuffer function |
Sets the specified screen buffer to be the currently displayed console screen buffer. |
miniksa |
miniksa |
article |
console, character mode applications, command line applications, terminal applications, console api |
|
|
|
c026cb94-c8ec-44ee-b432-3870ae3006c2 |
|
|
|
|
[!INCLUDE not-recommended-banner]
Sets the specified screen buffer to be the currently displayed console screen buffer.
BOOL WINAPI SetConsoleActiveScreenBuffer(
_In_ HANDLE hConsoleOutput
);
hConsoleOutput [in]
A handle to the console 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.
[!INCLUDE no-vt-equiv-alt-buf]
For an example, see Reading and Writing Blocks of Characters and Attributes.
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | ConsoleApi2.h (via WinCon.h, include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |