Mail Archives: djgpp/1999/01/04/06:43:31
On Mon, 4 Jan 1999, Kieran Farrell wrote:
> I was wondering if someone could give me some ideas on how to change
> text colour within a string.
This is only possible if you install the ANSI.SYS device driver and use
escape sequences to change colors. The device driver interprets these
escape sequences; the usual DOS display doesn't support them.
The ``normal'' way to do this in DOS is to change colors using textcolor
and textbackground functions, and print the text after changing color
with cprintf or cputs. But this doesn't support embedded color commands
(unless you write some code to do that for you).
- Raw text -