I've been trying to get the output handle to my console, but it doesn't seem to work. I got it to set the color of my text, but it's not changing.
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hOut, 0x0A)
I tried to debug it and I think I the handle isn't right. Is there any other way to do this, and is it normal that it doesn't work? Any fixes?
Thanks!
EDIT: Let me clarify, the handle that I'm trying to get is invalid. I've no idea how to fix it. I guess I'll start looking for alternatives; maybe something is wrong with my code.