Header File
conio.h
Category
Console I/O Routines
Prototype
void textattr(int newattr);
Description
Sets text attributes.
This function does not affect any characters currently onscreen; it affects only those characters displayed by functions (such as cprintf) performing text mode, direct video output after this function is called.
The color information is encoded in the newattr parameter as follows:
In this 8-bit newattr parameter:
Return Value
None.
Example
#include <conio.h> int main(void) { int i; clrscr(); for (i=0; i<9; i++) { textattr(i + ((i+1) << 4)); cprintf("This is a test\r\n"); } return 0; }
Portability
POSIX |
Win32 |
ANSI C |
ANSI C++ |
|
+ |
|
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|