delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/05/21:00:04.2

Message-ID: <39B593A5.540237D5@interlog.com>
From: Alan Illeman <illeman AT interlog DOT com>
X-Mailer: Mozilla 4.04 [en] (Win95; U)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: textmode() and textcolor() in DJGPP
References: <8p3stc$l0g$1 AT news6 DOT svr DOT pol DOT co DOT uk>
Lines: 29
Date: Tue, 05 Sep 2000 20:45:25 -0400
NNTP-Posting-Host: 154.5.93.221
X-Trace: cac1.rdr.news.psi.ca 968200283 154.5.93.221 (Tue, 05 Sep 2000 20:31:23 EDT)
NNTP-Posting-Date: Tue, 05 Sep 2000 20:31:23 EDT
Path: news.mv.net!newspeer.phoen-x.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!portc03.blue.aol.com!peerfeed.news.psi.net!psinr!cac1.rdr.news.psi.ca!not-for-mail
Xref: news.mv.net comp.os.msdos.djgpp:103189

use cprintf (from conio.h)
note that cprintf doesn't translate \n into \r\n

for(int i = 0; i<15; i++) {
    textcolor(i);
    cprintf("Foreground Color\r\n");
}

Rosemary Rayne wrote:
> 
> For some reason I cannot get DJGPP to change the color of the text that it
> outputs to the screen.
> 
> I use the lines:
> 
> #include <conio.h>
> int main(void) {
>     textmode(C80);
>     textcolor(CYAN);
>     printf("This should be cyan");
> }
> 
> Can anyone help me with this problem.
> 
> Regards,
> 
> Ed
> 
> edward DOT rayne AT talk21 DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019