0

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?

2
Contributors
5
Replies
9
Views
3 Years
Discussion Span
Last Post by cambalinho
1

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 by Ancient Dragon

0

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 by cambalinho

0

i have tested now:

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

the backcolor isn't blue

0

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 by cambalinho

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.