How can I change the Background Color in C++?

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!

to change the colors you may use the system dependend console functions:

SetConsoleTextAttribute() may do the trick:
Topic archived. No new replies allowed.