I found one API to do this, but i don't know use, if anyone can help-me
API SetCurrentConsoleFontEx
SetCurrentConsoleFontEx function (Windows)
Thank you for everything!
I found one API to do this, but i don't know use, if anyone can help-me
API SetCurrentConsoleFontEx
SetCurrentConsoleFontEx function (Windows)
Thank you for everything!
anyone?
Having searched for the function name, it's pretty easy to find examples of code which use that function.
Have you tried any of them?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Have you googled for the sample?
Have you compiled and run found sample?
Does your sample working not as expected?
Show your code and explain what is happening not as desired.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
You need to get the console handle for the first argument:
The second argument can probably be TRUE.Code:HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
Notice you need a struct for the third argument:
You can fill in the rest of the struct members (remember to use fonts only available in the console).Code:CONSOLE_FONT_INFOEX cfInfo; cfInfo.cbSize = sizeof(CONSOLE_FONT_INFOEX);
Then call the function:
Code:BOOL result = SetCurrentConsoleFontEx(hConsole, TRUE, &cfInfo);