Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
122 lines (93 sloc) 2.62 KB
title description author ms.author ms.topic ms.prod 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.
bitcrazed
richturn
article
console
console, character mode applications, command line applications, terminal applications, console api
\_win32\_setconsoleactivescreenbuffer
base.setconsoleactivescreenbuffer
consoles.setconsoleactivescreenbuffer
PreferredSiteName:MSDN
PreferredLib:/library/windows/desktop
c026cb94-c8ec-44ee-b432-3870ae3006c2
apiref
SetConsoleActiveScreenBuffer
Kernel32.dll
API-MS-Win-Core-Console-l2-1-0.dll
KernelBase.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
DllExport

SetConsoleActiveScreenBuffer function

Sets the specified screen buffer to be the currently displayed console screen buffer.

Syntax

BOOL WINAPI SetConsoleActiveScreenBuffer(
  _In_ HANDLE hConsoleOutput
);

Parameters

hConsoleOutput [in]
A handle to the console screen buffer.

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.

Remarks

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.

Examples

For an example, see Reading and Writing Blocks of Characters and Attributes.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wincon.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Console Functions

Console Screen Buffers

CreateConsoleScreenBuffer