|
From: Per W. <pw...@ia...> - 2003-04-12 09:33:43
|
No, it's not possible with 'standard' C++ libraries. To be able to set foreground and background colour, you must first decide what target system you are aiming for, and then locate some suitable functions. While it is possible to use escape sequences for setting colour on MSDos/Win32 command lines, most code either draws directly to the text memory, or calls bios functions. On Unix machines in general, most programs usess escape sequences, since the program may not run on IBM PC-compatible hardware, thereby not having a PC bios or a PC-compatible text display. /Per W On Sat, 12 Apr 2003, Dany P. Wu wrote: > Hi everyone, > > I'm just writing console programs at the moment, and was wondering if > there's a way of setting foreground and background colour of text? Is > this possible using standard C++ libraries? > > > Cheers, > Dany. > > -- > This mail is a natural product. The slight variations in > spelling and grammar enhance its individual character and > beauty and in no way are to be considered flaws or defects. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |