does any one know how can i use different text colors in the console for a DOS application?
can any one provide me with a simple code for that?
i am using VC++ 1.5 on win 2000
Tnx
does any one know how can i use different text colors in the console for a DOS application?
can any one provide me with a simple code for that?
i am using VC++ 1.5 on win 2000
Tnx
VC++ 1.5?!
Look in the FAQ, http://faq.cprogramming.com/cgi-bin/...&id=1043284392 .
SetConsoleTextAttribute().
http://msdn2.microsoft.com/en-us/library/ms686047.aspx
The code is fine. I believe you should update your compiler.
What errors are you getting?
Since this is kind of relevent, I'll ask this here instead of starting a new thread.
Is there a way that I can set the background colour for the console using the windows.h header?
I can change the background colour of text like this:
But I cant work out how to set the cls colour.Code:SetConsoleTextAttribute ( h, BACKGROUND_RED | 0 );
http://msdn2.microsoft.com/en-us/library/ms682073.aspx
If it's not in there, it can't be done