title | description | author | ms.author | ms.topic | keywords | f1_keywords | MS-HAID | MSHAttr | ms.assetid | topic_type | api_name | api_location | api_type | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GetLargestConsoleWindowSize function |
Retrieves the size of the largest possible console window, based on the current font and the size of the display. |
miniksa |
miniksa |
article |
console, character mode applications, command line applications, terminal applications, console api |
|
|
|
3e5897f3-4987-4a82-ab19-06c0b231ba67 |
|
|
|
|
[!INCLUDE not-recommended-banner]
Retrieves the size of the largest possible console window, based on the current font and the size of the display.
COORD WINAPI GetLargestConsoleWindowSize(
_In_ HANDLE hConsoleOutput
);
hConsoleOutput [in]
A handle to the console screen buffer.
If the function succeeds, the return value is a COORD structure that specifies the number of character cell columns (X member) and rows (Y member) in the largest possible console window. Otherwise, the members of the structure are zero.
To get extended error information, call GetLastError.
The function does not take into consideration the size of the console screen buffer, which means that the window size returned may be larger than the size of the console screen buffer. The GetConsoleScreenBufferInfo function can be used to determine the maximum size of the console window, given the current screen buffer size, the current font, and the display size.
[!INCLUDE no-vt-equiv-user-priv]
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 |