Hi everyone
When I try to use "CONSOLE_FONT_INFOEX" command to change console font, I face a compile error: "CONSOLE_FONT_INFOEX was not declared in this scope." I included "windows.h" header.
#include <windows.h>
#include<stdio.h>
#include<string.h>
#include<iostream>
#include<fstream>
#include <wincon.h>
using namespace std ;
int main()
{
system("chcp 65001");
CONSOLE_FONT_INFOEX cfi ;
cfi.cbSize = sizeof cfi;
cfi.nFont = 0;
cfi.dwFontSize.X = 0;
cfi.dwFontSize.Y = 20;
cfi.FontFamily = FF_DONTCARE;
cfi.FontWeight = FW_NORMAL;
wcscpy(cfi.FaceName, L"Lucida Console");
SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi);
printf("Hello, \u0444!\n");
return 0;
}
I am using Code::Blocks 16 and Windows 10. Could anybody please advise?