cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How can I change the Background Color in
How can I change the Background Color in C++?
Dec 14, 2012 at 8:12am UTC
BackBraker
(1)
Hi guys,
Sorry for my bad english, but i'm swiss... =)
So, my Problem is, i wrote a Program in C++ Win32. It always came in this Black box on my Screen. How can I make, that the Background Color is Blue and the Text is still White? I made it with
System(
"Color 2A"
);
But this is not very professional =)
So, how can i make it other?
Thanks for answers.
Have a nice Day!
BackBraker
Dec 14, 2012 at 8:24am UTC
coder777
(8439)
to change the colors you may use the system dependend console functions:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682073%28v=vs.85%29.aspx
SetConsoleTextAttribute()
may do the trick:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047%28v=vs.85%29.aspx
Topic archived. No new replies allowed.