how to change the text color in a C++ console app?
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.
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
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
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 -
setcolor(a number 1-16);
Or i could be just a bit dillusional
- Free Your Mind -
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement