Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
How to change font and background c
Name: Miroslav Date: May 14, 2004 at 15:54:38 Pacific OS: Win XP CPU/Ram: AMD Athon
Comment:
Do you know how to change the colors of the fonts and the background in a console application ?
Name: Miroslav Date: May 14, 2004 at 16:02:45 Pacific
Reply:
I forgot to say: this is a C Programming Problem.
Miroslav.
0
Response Number 2
Name: anonproxy Date: May 14, 2004 at 19:51:23 Pacific
Reply:
The stdlib function system would be the simplest way. system("string"); sends string as an argument to the shell. In Windows NT/2000/XP, the command color changes the background and/or foreground (text) colors. It follows hex notation. Use this chart.
For font, I don't know how to affect that from the shell. I've only seen two fonts in a Windows console (the old raster version and the newer smooth one). Regardless, a registry value should hold it, so you might have to run a batch file.
0
Response Number 3
Name: Victor516 Date: May 18, 2004 at 21:06:04 Pacific
Reply:
use include conio.h for background color use the function bgcolor() I use to pass a number in the function. I was never really sure what color you get for what int. for font color use textcolor() and pass an int in the () like in bgcolor. the color is only used for functions in conio.h so for print f use cprintf. look up the functions in conio.h
Summary: Hello everybody. Here again with another question. Lets see. I want to change the background of the windows Desktop using VB6, to a HTM file and NOT a Bitmap. That file is in a directory (naturally). ...
Summary: Hi... Im intrested to learn about programming in C and/or C++ Can someone help me to explain what do I need, what kind of compiler (and how to get one)and a good tutorial, well, i can find a tutorial,...