Enum StandardHandleInfo.ConsoleModes
Use these flags to test the values returned by GetConsoleMode.
Namespace: WizardWrx.ConsoleStreams
Assembly: WizardWrx.ConsoleStreams.dll
Syntax
public enum ConsoleModes : int
Remarks
In wincon.h, these are defined as symbolic constants, although there is ample justification for rolling them into a bit-mapped enumeration. I suspect the reason they aren't is that the change would break too much legacy code.
For the present, GetConsoleMode is called, but only for a side effect; its return value is discarded.
Though currently unused, the enumeration is reserved for future use.
The summaries shown here for all but the last member of this enumeration are quoted verbatim from the MSDN manual page of the SetConsoleMode function cited below.
Fields
Name | Description |
---|---|
ENABLE_AUTO_POSITION | Though defined in WinCon.h, this flag is otherwise undocumented. My initial best guess is that it is related to the "Let system position window" check box on the property sheet of a CMD.EXE window, though I have yet to test this theory. |
ENABLE_ECHO_INPUT | Characters read by the ReadFile or ReadConsole function are written to the active screen buffer as they are read. This mode can be used only if the ENABLE_LINE_INPUT mode is also enabled. |
ENABLE_EXTENDED_FLAGS | Required to enable or disable extended flags. See ENABLE_INSERT_MODE and ENABLE_QUICK_EDIT_MODE. |
ENABLE_INSERT_MODE | When enabled, text entered in a console window will be inserted at the current cursor location and all text following that location will not be overwritten. When disabled, all following text will be overwritten. To enable this mode, use ENABLE_INSERT_MODE | ENABLE_EXTENDED_FLAGS. To disable this mode, use ENABLE_EXTENDED_FLAGS without this flag. |
ENABLE_LINE_INPUT | The ReadFile or ReadConsole function returns only when a carriage return character is read. If this mode is disabled, the functions return when one or more characters are available. |
ENABLE_MOUSE_INPUT | If the mouse pointer is within the borders of the console window and the window has the keyboard focus, mouse events generated by mouse movement and button presses are placed in the input buffer. These events are discarded by ReadFile or ReadConsole, even when this mode is enabled. |
ENABLE_PROCESSED_INPUT | Characters written by the WriteFile or WriteConsole function or echoed by the ReadFile or ReadConsole function are examined for ASCII control sequences and the correct action is performed. Backspace, tab, bell, carriage return, and line feed characters are processed. |
ENABLE_QUICK_EDIT_MODE | This flag enables the user to use the mouse to select and edit text. To enable this mode, use ENABLE_QUICK_EDIT_MODE | ENABLE_EXTENDED_FLAGS. To disable this mode, use ENABLE_EXTENDED_FLAGS without this flag. |
ENABLE_WINDOW_INPUT | User interactions that change the size of the console screen buffer are reported in the console's input buffer. Information about these events can be read from the input buffer by applications using the ReadConsoleInput function, but not by those using ReadFile or ReadConsole. |