Click to See Complete Forum and Search --> : Colors
WippKreem
April 14th, 1999, 03:11 PM
I have no idea on how to change the colors in the programs i write i.e
void main()
{
cout << "hello" <<endl;
}
how would i go about making the word hello blue or yellow Ect.
Gomez Addams
April 14th, 1999, 03:20 PM
You have to resort to Console functions to do this.
SetConsoleTextAttribute will do specifically what you are after.
You will need a handle to the console to use this and you can get it with :
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
There are samples that illustrate more of what you can do with the console.
April 14th, 1999, 03:28 PM
How retro textual! (sorry)
You could learn all about ANSI.SYS (yech!) or look up the SetConsoleTextAttribute function (wincon.h) in the help system.
Have fun,
Dave Relyea
P.S. SetConsoleTextAttribute requires NT 3.1+ or Win9x.
April 23rd, 1999, 02:31 PM
What is ansi.sys or that other one??
I really ahve know idea what ths stuff is and if you could help out thanx.
WippKreem
April 23rd, 1999, 02:33 PM
WHere do i find the exaples at?
<b> WippKreem <\b> Sent this message
<email> Crimson_fyre3@yahoo.com<\email>
Gomez Addams
April 25th, 1999, 11:26 AM
There is a sample that comes with MSVC called Console.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.