Go to the first, previous, next, last section, table of contents.


textattr

Syntax

#include <conio.h>

void textattr(int _attr);

Description

Sets the attribute used for future writes to the screen:

---- XXXX = foreground color
-XXX ---- = background color
X--- ---- = 1=blink 0=steady

The include file <conio.h> contains an enum COLORS that define the various values that can be used for these bitfields; light colors can only be used for the foreground.

Portability

not ANSI, not POSIX

Example

/* blinking white on blue */
textattr(BLINK | (BLUE << 4) | WHITE);


Go to the first, previous, next, last section, table of contents.