color in C++ [Archive] - C Board

PDA

View Full Version : color in C++


Unregistered
06-21-2002, 10:57 AM
I was wonder how to color the text/background of text in C++. What is the command to do that?

no-one
06-21-2002, 11:52 AM
dos or command prompt?

Unregistered
06-21-2002, 11:55 AM
what do you mean by that? i am using microsoft visual C++ if that makes a difference...

Quantrizi
06-21-2002, 12:12 PM
include conio.h, and then look at it.

Unregistered
06-21-2002, 12:17 PM
what do you mean "then look at it"? do you mean the header file or the text?

Quantrizi
06-21-2002, 01:59 PM
Open up the header file, and look for something on the lines of textcolor.

TechWins
06-21-2002, 04:02 PM
better yet you could use this really special tool that not many people seem to know about. click here (http://www.cprogramming.com/cboard/search.php?s=) to try out this magical tool. you'll be amazed by it's powers!

Quantrizi
06-21-2002, 05:01 PM
Originally posted by TechWins
better yet you could use this really special tool that not many people seem to know about. click here (http://www.cprogramming.com/cboard/search.php?s=) to try out this magical tool. you'll be amazed by it's powers!
woooowwww...........your being sarcastic. Anyways, here's something that people actually use if they want to search: http://www.google.com

Unregistered
06-21-2002, 06:11 PM
um... thanx... but that doesnt really solve my problem...

Quantrizi
06-21-2002, 07:34 PM
Ok, here's what u do *assuming you're programming this for a console app*:

1. Go to the "Project Properties"

2. Go to "Further Object Files or linker options"

3. Add this in: C:\Dev-C++\Lib\conio.o *assuming C:|Dev-C++\ is the installation path, if not, then change it*

4. Click "OK"

5. Include the conio.h file.

*NOTE: This is all assuming you are using Dev-C++ 4.0, but if not, then it shouldn't be hard to change*

Okiesmokie
06-21-2002, 09:20 PM
you dont use the textcolor() function to change the text color with VC++, i cant remember what the function is called tho :(

C_Coder
06-22-2002, 02:12 AM
>> you dont use the textcolor() function to change the text color with VC++, i cant remember what the function is called tho

It's called SetConsoleTextAttribute (http://www.cprogramming.com/cboard/showthread.php?s=&threadid=19843)