title | description | author | ms.author | ms.topic | keywords | f1_keywords | MS-HAID | MSHAttr | ms.assetid | topic_type | api_name | api_location | api_type | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CHAR_INFO structure |
Specifies a Unicode or ANSI character and its attributes. This structure is used by console functions to read from and write to a console screen buffer. |
miniksa |
miniksa |
article |
console, character mode applications, command line applications, terminal applications, console api |
|
|
|
5574a862-b262-41af-8862-e9837c5c7b5f |
|
|
|
|
[!INCLUDE not-recommended-banner]
Specifies a Unicode or ANSI character and its attributes. This structure is used by console functions to read from and write to a console screen buffer.
typedef struct _CHAR_INFO {
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO, *PCHAR_INFO;
Char
A union of the following members.
UnicodeChar
Unicode character of a screen buffer character cell.
AsciiChar
ANSI character of a screen buffer character cell.
Attributes
The character attributes. This member can be zero or any combination of the following values.
Value | Meaning |
---|---|
FOREGROUND_BLUE 0x0001 |
Text color contains blue. |
FOREGROUND_GREEN 0x0002 |
Text color contains green. |
FOREGROUND_RED 0x0004 |
Text color contains red. |
FOREGROUND_INTENSITY 0x0008 |
Text color is intensified. |
BACKGROUND_BLUE 0x0010 |
Background color contains blue. |
BACKGROUND_GREEN 0x0020 |
Background color contains green. |
BACKGROUND_RED 0x0040 |
Background color contains red. |
BACKGROUND_INTENSITY 0x0080 |
Background color is intensified. |
COMMON_LVB_LEADING_BYTE 0x0100 |
Leading byte. |
COMMON_LVB_TRAILING_BYTE 0x0200 |
Trailing byte. |
COMMON_LVB_GRID_HORIZONTAL 0x0400 |
Top horizontal. |
COMMON_LVB_GRID_LVERTICAL 0x0800 |
Left vertical. |
COMMON_LVB_GRID_RVERTICAL 0x1000 |
Right vertical. |
COMMON_LVB_REVERSE_VIDEO 0x4000 |
Reverse foreground and background attribute. |
COMMON_LVB_UNDERSCORE 0x8000 |
Underscore. |
For an example, see Scrolling a Screen Buffer's Contents.
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | WinCon.h (include Windows.h) |