www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/19/14:00:22

Message-ID: <19981119181615.10973.qmail@hotmail.com>
X-Originating-IP: [195.44.9.66]
From: "a j" <aj664 AT hotmail DOT com>
To: djgpp AT delorie DOT com
Subject: Re: coloured text
MIME-Version: 1.0
Date: Thu, 19 Nov 1998 10:16:15 PST
Reply-To: djgpp AT delorie DOT com


>From: "kryton" <kryton AT thefarm DOT net.###>
>Subject: coloured text
>Date: 19 Nov 1998 14:27:12 GMT
>To: djgpp AT delorie DOT com
>Reply-To: djgpp AT delorie DOT com
>
>Hi  
>could someone out there shed some light on how to set text colours ? 
>without using allegro that is :)

#include <conio.h>
int main(void)
{
   textattr(background_color * 16 + foreground colour )
   cprintf("this is coloured text\n");
}


background_color is 0 to 7
foreground_color is 0 to 15





______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

- Raw text -


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