2.5.1 ConsoleDataBlock
The ConsoleDataBlock structure specifies the display settings to use when a link target specifies an application that is run in a console window.<2>
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BlockSize |
|||||||||||||||||||||||||||||||
BlockSignature |
|||||||||||||||||||||||||||||||
FillAttributes |
PopupFillAttributes |
||||||||||||||||||||||||||||||
ScreenBufferSizeX |
ScreenBufferSizeY |
||||||||||||||||||||||||||||||
WindowSizeX |
WindowSizeY |
||||||||||||||||||||||||||||||
WindowOriginX |
WindowOriginY |
||||||||||||||||||||||||||||||
Unused1 |
|||||||||||||||||||||||||||||||
Unused2 |
|||||||||||||||||||||||||||||||
FontSize |
|||||||||||||||||||||||||||||||
FontFamily |
|||||||||||||||||||||||||||||||
FontWeight |
|||||||||||||||||||||||||||||||
Face Name (64 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
CursorSize |
|||||||||||||||||||||||||||||||
FullScreen |
|||||||||||||||||||||||||||||||
QuickEdit |
|||||||||||||||||||||||||||||||
InsertMode |
|||||||||||||||||||||||||||||||
AutoPosition |
|||||||||||||||||||||||||||||||
HistoryBufferSize |
|||||||||||||||||||||||||||||||
NumberOfHistoryBuffers |
|||||||||||||||||||||||||||||||
HistoryNoDup |
|||||||||||||||||||||||||||||||
ColorTable (64 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
BlockSize (4 bytes): A 32-bit, unsigned integer that specifies the size of the ConsoleDataBlock structure. This value MUST be 0x000000CC.
BlockSignature (4 bytes): A 32-bit, unsigned integer that specifies the signature of the ConsoleDataBlock extra data section. This value MUST be 0xA0000002.
FillAttributes (2 bytes): A 16-bit, unsigned integer that specifies the fill attributes that control the foreground and background text colors in the console window. The following bit definitions can be combined to specify 16 different values each for the foreground and background colors:
-
Value
Meaning
FOREGROUND_BLUE
0x0001
The foreground text color contains blue.
FOREGROUND_GREEN
0x0002
The foreground text color contains green.
FOREGROUND_RED
0x0004
The foreground text color contains red.
FOREGROUND_INTENSITY
0x0008
The foreground text color is intensified.
BACKGROUND_BLUE
0x0010
The background text color contains blue.
BACKGROUND_GREEN
0x0020
The background text color contains green.
BACKGROUND_RED
0x0040
The background text color contains red.
BACKGROUND_INTENSITY
0x0080
The background text color is intensified.
PopupFillAttributes (2 bytes): A 16-bit, unsigned integer that specifies the fill attributes that control the foreground and background text color in the console window popup. The values are the same as for the FillAttributes field.
ScreenBufferSizeX (2 bytes): A 16-bit, signed integer that specifies the horizontal size (X axis), in characters, of the console window buffer.
ScreenBufferSizeY (2 bytes): A 16-bit, signed integer that specifies the vertical size (Y axis), in characters, of the console window buffer.
WindowSizeX (2 bytes): A 16-bit, signed integer that specifies the horizontal size (X axis), in characters, of the console window.
WindowSizeY (2 bytes): A 16-bit, signed integer that specifies the vertical size (Y axis), in characters, of the console window.
WindowOriginX (2 bytes): A 16-bit, signed integer that specifies the horizontal coordinate (X axis), in pixels, of the console window origin.
WindowOriginY (2 bytes): A 16-bit, signed integer that specifies the vertical coordinate (Y axis), in pixels, of the console window origin.
Unused1 (4 bytes): A value that is undefined and MUST be ignored.
Unused2 (4 bytes): A value that is undefined and MUST be ignored.
FontSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in pixels, of the font used in the console window. The two most significant bytes contain the font height and the two least significant bytes contain the font width. For vector fonts, the width is set to zero.
FontFamily (4 bytes): A 32-bit, unsigned integer that specifies the family of the font used in the console window. This value MUST be comprised of a font family and a font pitch. The values for the font family are shown in the following table:
-
Value
Meaning
FF_DONTCARE
0x0000
The font family is unknown.
FF_ROMAN
0x0010
The font is variable-width with serifs; for example, "Times New Roman".
FF_SWISS
0x0020
The font is variable-width without serifs; for example, "Arial".
FF_MODERN
0x0030
The font is fixed-width, with or without serifs; for example, "Courier New".
FF_SCRIPT
0x0040
The font is designed to look like handwriting; for example, "Cursive".
FF_DECORATIVE
0x0050
The font is a novelty font; for example, "Old English".
-
A bitwise OR of one or more of the following font-pitch bits is added to the font family from the previous table:
-
Value
Meaning
TMPF_NONE
0x0000
A font pitch does not apply.
TMPF_FIXED_PITCH
0x0001
The font is a fixed-pitch font.
TMPF_VECTOR
0x0002
The font is a vector font.
TMPF_TRUETYPE
0x0004
The font is a true-type font.
TMPF_DEVICE
0x0008
The font is specific to the device.
-
FontWeight (4 bytes): A 32-bit, unsigned integer that specifies the stroke weight of the font used in the console window.
-
Value
Meaning
700 ≤ value
A bold font.
value < 700
A regular-weight font.
Face Name (64 bytes): A 32-character Unicode string that specifies the face name of the font used in the console window.
CursorSize (4 bytes): A 32-bit, unsigned integer that specifies the size of the cursor, in pixels, used in the console window.
-
Value
Meaning
value ≤ 25
A small cursor.
26 — 50
A medium cursor.
51 — 100
A large cursor.
FullScreen (4 bytes): A 32-bit, unsigned integer that specifies whether to open the console window in full-screen mode.
-
Value
Meaning
0x00000000
Full-screen mode is off.
0x00000000 < value
Full-screen mode is on.
QuickEdit (4 bytes): A 32-bit, unsigned integer that specifies whether to open the console window in QuikEdit mode. In QuickEdit mode, the mouse can be used to cut, copy, and paste text in the console window.
-
Value
Meaning
0x00000000
QuikEdit mode is off.
0x00000000 < value
QuikEdit mode is on.
InsertMode (4 bytes): A 32-bit, unsigned integer that specifies insert mode in the console window.
-
Value
Meaning
0x00000000
Insert mode is disabled.
0x00000000 < value
Insert mode is enabled.
AutoPosition (4 bytes): A 32-bit, unsigned integer that specifies auto-position mode of the console window.
-
Value
Meaning
0x00000000
The values of the WindowOriginX and WindowOriginY fields are used to position the console window.
0x00000000 < value
The console window is positioned automatically.
HistoryBufferSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in characters, of the buffer that is used to store a history of user input into the console window.
NumberOfHistoryBuffers (4 bytes): A 32-bit, unsigned integer that specifies the number of history buffers to use.
HistoryNoDup (4 bytes): A 32-bit, unsigned integer that specifies whether to remove duplicates in the history buffer.
-
Value
Meaning
0x00000000
Duplicates are not allowed.
0x00000000 < value
Duplicates are allowed.
ColorTable (64 bytes): A table of 16 32-bit, unsigned integers specifying the RGB colors that are used for text in the console window. The values of the fill attribute fields FillAttributes and PopupFillAttributes are used as indexes into this table to specify the final foreground and background color for a character.