Jump to content
  • Advertisement


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


Changing Text Color in Console App

This topic is 6548 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

Check out this tutorial:

Edited by - Bino on July 19, 2000 3:39:40 AM

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
That''s a fine reference for DOS.

Basically, assuming you''re using C/C++, there is no standard method for changing text color. You need to use OS and/or compiler specific methods. C didn''t have one because at the time there was no such thing as colored text unless you physically changed the ribbon in your line printer. The C++ designers probably just didn''t think it important enough.

For DOS see above.
For Win32 take a look at GetStdHandle/SetConsoleTextAttribute().
Other systems will have other methods, all different.


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!