Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 2.38 KB

setconsoledisplaymode.md

File metadata and controls

88 lines (66 loc) · 2.38 KB
title description author ms.author ms.topic keywords f1_keywords MS-HAID MSHAttr ms.assetid topic_type api_name api_location api_type
SetConsoleDisplayMode function
See reference information about the SetConsoleDisplayMode function, which sets the display mode of the specified console screen buffer.
miniksa
miniksa
article
console, character mode applications, command line applications, terminal applications, console api
consoleapi3/SetConsoleDisplayMode
wincon/SetConsoleDisplayMode
SetConsoleDisplayMode
base.setconsoledisplaymode
consoles.setconsoledisplaymode
PreferredSiteName:MSDN
PreferredLib:/library/windows/desktop
27437a85-f784-41fc-8279-9fe089b0a744
apiref
SetConsoleDisplayMode
Kernel32.dll
DllExport

SetConsoleDisplayMode function

[!INCLUDE not-recommended-banner]

Sets the display mode of the specified console screen buffer.

Syntax

BOOL WINAPI SetConsoleDisplayMode(
  _In_      HANDLE hConsoleOutput,
  _In_      DWORD  dwFlags,
  _Out_opt_ PCOORD lpNewScreenBufferDimensions
);

Parameters

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

dwFlags [in]
The display mode of the console. This parameter can be one or more of the following values.

Value Meaning
CONSOLE_FULLSCREEN_MODE 1 Text is displayed in full-screen mode.
CONSOLE_WINDOWED_MODE 2 Text is displayed in a console window.

lpNewScreenBufferDimensions [out, optional]
A pointer to a COORD structure that receives the new dimensions of the screen buffer, in characters.

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

[!INCLUDE no-vt-equiv-user-priv]

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header ConsoleApi3.h (via WinCon.h, include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

Console Functions

Console Modes

GetConsoleDisplayMode