2.1.1 VTNT_SINGLE_CHAR

The VTNT_SINGLE_CHAR structure contains a pair of fields that represents a character sent to the console window, and that character's attributes.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Char

Char_Attributes

Char (2 bytes): A 2-byte character field that specifies the character to be held in one character cell location of the console screen buffer. Char is the first of the <Char,Char_attributes> pair that can be repeated any number of times within the VTNT_CHAR_INFO structure. Telnet VTNT Terminal Type Format does not specify the character set to be used. Rather, client and server implementations are to be configured to use a compatible character set, such as Unicode UTF-16.<2> If the character set used is a single-byte character set such as ASCII, then the first byte of Char MUST contain the character value, and the second byte MUST be zero.

Char_Attributes (2 bytes): A 2-byte unsigned integer field that specifies an additional attribute of the character specified in the Char field immediately preceding this field. Char_attributes is the second of the <Char,Char_attributes> pair that can be repeated any number of times.

This field MUST be zero, or the result of a bitwise OR of one or more of the following values.

The values that start with COMMON MAY be used only if the character set used is a double-byte character set; those values MUST NOT be used for non-double-byte character sets.

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