Jump to content
  • Advertisement

Archived

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

bobbias

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

This topic is 5784 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
if you are using the graphics.h, i think it''s just
setcolor(a number 1-16);
Or i could be just a bit dillusional

- Free Your Mind -

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!