C Language and Libraries Help (clang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
_MAXRESMODE and _MAXCOLORMODE Constants for Screen Mode
◄Up► ◄Contents► ◄Index► ◄Back►
─────Run-Time Library───────────────────────────────────────────────────────
Constant: _MAXRESMODE, _MAXCOLORMODE
Context: _setvideomode, _setvideomoderows
Include: <graph.h>
Synopsis: The two special modes for the _setvideomode function
_MAXRESMODE and _MAXCOLORMODE select the highest
resolution or greatest number of colors available with
the current hardware, respectively. These two modes fail
for adapters that do not support graphics modes. They
never select _SRES16COLOR, _SRES256COLOR, _XRES16COLOR,
_XRES256COLOR, _ZRES16COLOR, or _ZRES256COLOR mode.
See: ◄Constants for Screen Mode►
◄VESA Constants for Screen Mode►
◄Hercules Support►
The following table lists the video mode selected for different
adapter and monitor combinations when _MAXRESMODE or
_MAXCOLORMODE is specified:
Adapter/Monitor _MAXRESMODE _MAXCOLORMODE
MDPA fail fail
HGC _HERCMONO _HERCMONO
CGA color _HRESBW _MRES4COLOR
CGA noncolor _HRESBW _MRESNOCOLOR
OCGA _ORESCOLOR _MRES4COLOR
OEGA color _ORESCOLOR _ERESCOLOR
EGA color 256k _HRES16COLOR _HRES16COLOR
EGA color 64k _HRES16COLOR _HRES16COLOR
EGA ecd 256k _ERESCOLOR _ERESCOLOR
EGA ecd 64k _ERESCOLOR _HRES16COLOR
EGA mono _ERESNOCOLOR _ERESNOCOLOR
MCGA _VRES2COLOR _MRES256COLOR
VGA _VRES16COLOR _MRES256COLOR
OVGA _VRES16COLOR _MRES256COLOR
SVGA _VRES256COLOR * _VRES256COLOR *
* If _VRES256COLOR is supported by the adapter/monitor combination.
If not, _MAXCOLORMODE will be either _ORES256COLOR (if supported)
or _MRES256COLOR and _MAXRESMODE will be _VRES16COLOR.
Note that a color monitor is assumed for CGA adapters if the
startup text mode was TEXTC80 or TEXTC40. If the initial text mode
is TEXTBW80 or TEXTBW40, a noncolor CGA monitor is assumed.
-♦-