Get Console Font Cplusplus
unknown
c_cpp
4 years ago
684 B
6
Indexable
// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <string>
#define _WIN32_WINNT 0x500
#include <windows.h>
int main()
{
HWND hwnd;
hwnd = GetConsoleWindow();
std::cout << "HWND:" << hwnd << "\n";
CONSOLE_FONT_INFO lpConsoleCurrentFont;
GetCurrentConsoleFont(hwnd, false, &lpConsoleCurrentFont);
std::cout << "Font:" << lpConsoleCurrentFont.nFont <<"\n";
COORD cord;
cord = GetConsoleFontSize(hwnd, lpConsoleCurrentFont.nFont);
std::cout << "FontSize:(" << cord.X <<":" << cord.Y << ")\n";
system("PAUSE");
return 0;
}
Editor is loading...