The CHAR_INFO structure specifies the Unicode or ANSI character and the foreground (text) and background color attributes of a screen buffer character cell. This structure is used by console functions to read from and write to a console screen buffer.
typedef struct _CHAR_INFO { // chi
union { /* Unicode or ANSI character */
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes; // text and background colors
} CHAR_INFO, *PCHAR_INFO;
BACKGROUND_BLUE | FOREGROUND_BLUE |
BACKGROUND_GREEN | FOREGROUND_GREEN |
BACKGROUND_RED | FOREGROUND_RED |
BACKGROUND_INTENSITY | FOREGROUND_INTENSITY |
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in wincon.h.
Consoles and Character-Mode Support Overview, Console Structures, ReadConsoleOutput, ScrollConsoleScreenBuffer, WriteConsoleOutput