PDA

View Full Version : Does anybody know the code to change the color of


thechillyman(again)
03-15-2002, 02:02 PM
Do you know the code in c++, not c. To change the color of text in a c++ dos console program.

I would really apriciate it if you know the answer and could share this information.

Thanks

Neas
04-03-2002, 02:43 PM
alert("Hello!")
<script> alert("Hello")</script>

Yes Hi there,
you need to add:
#include <winconsole.h>
to the beginning of your sourcecode.
Then in your initialization SPAMyou need to add:
winconsole.forecolor = 000FFF;
Replace the 000FFF with the HEX code for the color you want.
To change the background:
winconsole.backcolor = 000FFF

Hope u hav phun,
From Neas

Keefe
04-03-2002, 11:14 PM
How can you change the colors of specific words and text, not the whole thing?

Thanks

keefe

mike
10-20-2002, 02:55 PM
I get this error:
'fatal error C1083: Cannot open include file: 'winconsole.h': No such file or directory'

when i add the winconsole.h

Can you help?

Uranium-235
10-20-2002, 03:09 PM
Neas that's for a windows console. not dos

I don't think thier is one for C++

this is from my borland Turbo C 3.0

_____________________________________
_ textbackground selects a new text background color
_ textcolor selects a new character color in text mode

_ void textbackground(int newcolor);
_ void textcolor(int newcolor);

the "newcolor" is number 0-15. Dos only supports 16 colors

eviltechie
10-20-2002, 07:14 PM
looked into my Borland C++ builder Unleashed big mofo book....

cant find anything on the Tcolor for DOS
so i think U is right, it doesnt exist...

but dont give up
u can still try to find this on google...