Maybe google GetStdHandle and SetConsoleTextAttribute instead of asking someone to do it for you.
After that, ask about what you don't understand. |
I Google'd it and it did not make much sense to me.
At first glance I'd say you should put GetStdHandle() into the main function rather than what you're doing now. |
I'm using it in several functions, and I am setting it up outside of main() so that I can do so without setting it up every time.
This made me giggle. Minimal knowledge of C++ will tell you that of the 9 effective lines, there's something wrong with 4 of them. That's roughly 45%... |
This doesn't seem like a very constructive response to me... the program runs perfectly fine, in fact I started a new one just today that runs better.
Everyone, what I would like to know is what each of the codes mean, I Google'd them, YouTube'd them, etc., and came up without a good explanation.
What is:
GetStdHandle(STD_OUTPUT_HANDLE)
Doing?
Now, though, I realise that in the code:
SetConsoleTextAttribute (hFontColor, iFontColor);
iFontColor is the value 1-256 of the font's coloring, FG + BG * 16 <= 256. What I don't understand, however, is what
GetStdHandle(STD_OUTPUT_HANDLE)
is doing.