Archived

This topic is now archived and is closed to further replies.

bobbias

how to change the text color in a C++ console app?

Recommended Posts

I want to know exactly what the subject asks, how to change the color of text in a C++ consol app. what the syntax is what the core concepts are and how to use the syntax. could someone help me here? Oh and btw: I''m implementing it in a mud like text-based rpg console app. I don''t have much, ad Idea''s and general help and tips on how to disign the game would be welcome too.

Share this post


Link to post
Share on other sites
Look up SetConsoleTextAttribute() on the MSDN. There are a whole bunch of console related functions. They shouldn''t be too hard to find. Also, there are a couple of old threads on this forum about this topic. Do a search for "console color" and you should get some helpful info.

However, I got some odd results when I changed the text color in one of my console apps a while back. It didn''t seem to set them all correctly, and text colors would switch back and forth and generally act funny. If anyone can explain that, I would be much appreciative.

-Mike

Share this post


Link to post
Share on other sites