|
From: Ioannis V. <iv...@at...> - 2003-04-12 11:18:36
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Per Westermark > Sent: Saturday, April 12, 2003 12:32 PM > To: Dany P. Wu > Cc: dev...@li... > Subject: Re: [Dev-C++] Setting text colour > > > 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. I remember ANSI graphics from the old times (we had to include ansi.sys for them to work). I am assuming ANSI graphics are not valid anymore in the Win2k/WinXP world but if someone has a DOS system he can do the job (or maybe even Win9x). They worked also with escape sequences even in a batch file. But he probavly would be satsfied with Allegro library. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net Anti-racism movement: http://www.positive-youthfoundation.org Iraq Peace Pledge: http://www.peacepledge.org |