[C / C ] Text color in Dev-C – How do change color of text in Dev C
To write text color in Dev-C you can simply use the command system(“color xy”);
Where x is the background color, y is the text color:
But on the way back with an error if the entire set different color font color will be there, ie the colored letters that we finally put color. To fix it you have to learn and know the function (library use windows.h) on congdongcviet.com
void SetTeColor(WORD color) { HANDLE hConsoleOutput; hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO screen_buffer_info; GetConsoleScreenBufferInfo(hConsoleOutput, &screen_buffer_info); WORD wAttributes = screen_buffer_info.wAttributes; color &= 0x000f; wAttributes &= 0xfff0; wAttributes |= color; SetConsoleTextAttribute(hConsoleOutput, wAttributes); }
After reading also do not understand what, but make it stable, Fixed color of the text as desired.
Star e SetTeColor function test it in all the color a word. e want it in the color of each word, how lah a !! thank a!! :))
This makes sure not console my friend. You need graphics mode in new dev-C can do.
e want to know better than a post code is k you
Code is clearer how your code?
He asked me. how to change the font size on the display console . (Changed by writing content like above her jaw SetTeColor ) .
This is a bear
He can be explained more clearly how to use it thank you very much a.cam
In the code is to apply a whip ma da
ohh.. windows.h programming API.