[comp.lang.c] color in text mode

jeffs@scr1.ocpt.ccur.com (Jeff Schnell <schnell>) (02/15/90)

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@scr1.ccur.com

thorp@spudge.UUCP (Don Thorp) (02/16/90)

In article <600@scr1.ocpt.ccur.com> jeffs@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@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@rwsys.lonestar.org