CRT Documentation: Reference

TCrtSaveStates

[This type does not have a corresponding DOS type.]

Used when calling SaveCrtState to specify which states to save.

TCrtSaveStates = set of
  (csScreen,
   csCursorPos,
   csCursor,
   csTextAttr,
   csMode,
   csWindow,
   csVars
  );

Set Values

csScreen
Saves the contents of the screen (all characters and color attributes for each character cell).
csCursorPos
Saves the current cursor position (WhereX, WhereY).
csCursor
Saves the current cursor attributes (size, visibility).
csTextAttr
Saves the current color used to write text (TextAttr).
csMode
Saves the current mode of the console (LastMode, the internal current mode and the original dimensions of the console).
csWindow
Saves the current window dimensions (WindMin and WindMax).
csVars
Saves the values of BinaryWrite, CheckBreak, CheckSnow and DirectVideo.

Remarks

This set is used with SaveCrtState to specify which states to save. Generally, the memory allocated is the same no matter what states are saved, the exception is csScreen, which consumes ScreenWidth * ScreenHeight * SizeOf(CHAR_INFO) bytes of memory. If csScreen is omitted, that memory is not allocated, otherwise the only gain may be a slight speed up in execution from not having to save and restore the extra fields (which will be minimal).

See Also

Crt Overview, SaveCrtState