Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SetColor(int ForgC)
- {
- WORD wColor;
- HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
- CONSOLE_SCREEN_BUFFER_INFO csbi;
- if(GetConsoleScreenBufferInfo(hStdOut, &csbi))
- {
- wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F);
- SetConsoleTextAttribute(hStdOut, wColor);
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement