Maximizing Resolution or Color

The constant _MAXRESMODE selects the highest possible resolution for the graphics adapter and monitor currently in use. The constant _MAXCOLORMODE selects the graphics mode with the greatest number of colors. These constants work with all graphics adapters except the MDPA. These constants never select the _SRES, _XRES, or _ZRES mode to avoid possible monitor damage and to guarantee that the selected mode works. (See Table 9.3.)

Table 9.3 Constants for Maximum Resolution and Color

Adapter/Monitor _MAXRESMODE _MAXCOLORMODE

CGA _HRESBW _MRES4COLOR
EGA color _HRES16COLOR _HRES16COLOR
EGA ecd 64K _ERESCOLOR _HRES16COLOR
EGA ecd 256K _ERESCOLOR _ERESCOLOR
EGA mono _ERESNOCOLOR _ERESNOCOLOR
HGC _HERCMONO _HERCMONO
MCGA _VRES2COLOR _MRES256COLOR
MDPA Fails Fails
OCGA _ORESCOLOR _MRES4COLOR
OEGA color _ORESCOLOR _ERESCOLOR
VGA/OVGA _VRES16COLOR _MRES256COLOR
SVGA* _VRES256COLOR _VRES256COLOR

* If your SVGA adapter does not support _VRES256COLOR, _MAXCOLORMODE selects _ORES256COLOR. If _ORES256COLOR is not supported either, the VGA modes for maximum color and maximum resolution are used.