i know use SetConsoleTextAttribute():

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ForgC|(BackC<<4) );

(too be honest: i don't have sure if i can avoid the '<<4')
i need ask these: can i add it more data and then use it?
like:
Blink=128

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ForgC|(BackC<<4) | Blink);

and then test if these value is there?

The shift is not necessary, should be able to just or the forground and background colors together as you have done without the shift. As for your question, did you try it to see if it works?

Edited 3 Years Ago by Ancient Dragon

thanks for correct me. i can try and test if theres an error. but then how can i test if the Blink is there?

Edited 3 Years Ago by cambalinho

i have tested now:

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | BACKGROUND_BLUE | 2000 );

the backcolor isn't blue

sorry... don't forget that i add '| 2000', that's why i don't recive the correct results.
so i can't use SetConsoleTextAttribute() for add extra data. but i did in a diferent way and works fine ;)
in time, i will share the Console class... you will love it ;)
thanks for all

Edited 3 Years Ago by cambalinho

This question has already been answered. Start a new discussion instead.