CONSOLE_SELECTION_INFO structure

Important

This document describes console platform functionality that is no longer a part of our ecosystem roadmap. We do not recommend using this content in new products, but we will continue to support existing usages for the indefinite future. Our preferred modern solution focuses on virtual terminal sequences for maximum compatibility in cross-platform scenarios. You can find more information about this design decision in our classic console vs. virtual terminal document.

Contains information for a console selection.

Syntax

typedef struct _CONSOLE_SELECTION_INFO {
  DWORD      dwFlags;
  COORD      dwSelectionAnchor;
  SMALL_RECT srSelection;
} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;

Members

dwFlags
The selection indicator. This member can be one or more of the following values.

Value Meaning
CONSOLE_MOUSE_DOWN 0x0008 Mouse is down. The user is actively adjusting the selection rectangle with a mouse.
CONSOLE_MOUSE_SELECTION 0x0004 Selecting with the mouse. If off, the user is operating conhost.exe mark mode selection with the keyboard.
CONSOLE_NO_SELECTION 0x0000 No selection.
CONSOLE_SELECTION_IN_PROGRESS 0x0001 Selection has begun. If a mouse selection, this will typically not occur without the CONSOLE_SELECTION_NOT_EMPTY flag. If a keyboard selection, this may occur when mark mode has been entered but the user is still navigating to the initial position.
CONSOLE_SELECTION_NOT_EMPTY 0x0002 Selection rectangle not empty. The payload of dwSelectionAnchor and srSelection are valid.

dwSelectionAnchor
A COORD structure that specifies the selection anchor, in characters.

srSelection
A SMALL_RECT structure that specifies the selection rectangle.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header ConsoleApi3.h (via WinCon.h, include Windows.h)

See also

COORD

GetConsoleSelectionInfo

SMALL_RECT