I am writing a Win32 Console application and I need to change the font size to 18x10 pixels. I think this can be done with a function in windows.h but Im not sure which one or how to do it.
f_escobar82
0
Newbie Poster
Recommended Answers
Jump to PostThe function is called CreateFont(), not something for the faint at heart!
HFONT CreateFont( int nHeight, // logical height of font int nWidth, // logical average character width int nEscapement, // angle of escapement int nOrientation, // base-line orientation angle int fnWeight, // font weight DWORD fdwItalic, …
Jump to PostI dont think this function will work for console apps. The program Im writing runs in DOS window.
There is a code snippet on DaniWeb called "Add WinBGI Graphics to your Console" at:
http://www.daniweb.com/code/snippet176.html
check the lines ...setcolor(YELLOW); settextstyle(DEFAULT_FONT, HORIZ_DIR, 2); // 2 = size outtextxy(20, …
All 7 Replies
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
f_escobar82
0
Newbie Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
f_escobar82
0
Newbie Poster
f_escobar82
0
Newbie Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
kc0arf
68
Posting Virtuoso
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.