|
-
April 14th, 1999, 03:11 PM
#1
Colors
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.
-
April 14th, 1999, 03:20 PM
#2
Re: Colors
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
#3
Re: Colors
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
#4
Re: Colors
What is ansi.sys or that other one??
I really ahve know idea what ths stuff is and if you could help out thanx.
-
April 23rd, 1999, 02:33 PM
#5
Re: Colors
WHere do i find the exaples at?
<b> WippKreem <\b> Sent this message
<email> [email protected]<\email>
-
April 25th, 1999, 11:26 AM
#6
Re: Colors
There is a sample that comes with MSVC called Console.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|