color in text mode

Don Thorp thorp at spudge.UUCP
Sat Feb 17 01:17:41 AEST 1990


In article <600 at scr1.ocpt.ccur.com> jeffs at scr1.ocpt.ccur.com (Jeff Schnell <schnell>) writes:
>I need to setup color for the whole background in text mode with
>turbo C.  I problem I have is turbo C only sets the color behind a
>character and not the whole background.
>
>Please email if possible
>
>Jeff Schnell
>-- 
>Jeffrey J. Schnell   System Support Eng.      | Concurrent Computer Corp.
>FAX:  201-870-4249   Ph: (201) 870-4120       | 2 Crescent Place, M/S 117
>UUCP: ucbvax!rutgers!petsd!tsdiag!scr1!jeffs  | Oceanport NJ, 07757
>INTERNET: jeffs at scr1.ccur.com

I haven't compiled the following, but try it.

#include <conio.h>

int main(void) {

  textbackground(RED);
  clrscr();
}
  
The above routine will set the entire background to RED.

Don Thorp

UUCP: ..!texbell!rwsys!spudge!thorp
INTERNET: thorp at rwsys.lonestar.org



More information about the Comp.lang.c mailing list