How To Change The Color Of A Single Output On Console?

i am using visual studio 6.0 i want to change the output of the single output on console

different characters are printed on screen i want that every character is of different color

please tell me the appropriate functions and header file compatible with VC++

i don't want to use system color function as it changes background and foreground color for whole program

so tell me some other appropriate function

Thanks!!



Answer on How To Change The Color Of A Single Output On Console?



The best way is to use a curses library. PDCurses is a free public domain version of Curses that is available for Windows. It has the advantage of both being portable, and much simpler to use than the Win32 Console API. But it, for whatever reason, you don't want to deal with a third party library, you can use the Win32 Console API. Here's a link the documentation for it:



http://msdn.microsoft.com/en-us/library/…



The function you would be interested in is SetConsoleTextAttribute

0 Response to "How To Change The Color Of A Single Output On Console?"

Posting Komentar

Postingan Populer