A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The GetConsoleFontSize function retrieves the size of the font used by the specified console screen buffer.

Declare Function GetConsoleFontSize Lib "kernel32" (ByVal hConsoleOutput As Long, ByVal nFont As Long) As COORD

Operating Systems Supported
Requires Windows XP or later; Win9x/ME: Not supported


Parameter Information
- hConsoleOutput
[in] Handle to a console screen buffer. The handle must have GENERIC_READ access.

- nFont
[in] Index of the font whose size is to be retrieved. This index is obtained by calling the GetCurrentConsoleFont function.

Return Values
If the function succeeds, the return value is a COORD structure that contains the width and height of each character in the font. The X member contains the width, while the Y member contains the height.

If the function fails, the width and the height are zero. To get extended error information, call GetLastError.

Last update: 07 April 2006