Microsoft KB Archive/43587

{|
 * width="100%"|

Why _setvideomode May Fail to Set Some Modes

 * }

Q43587

5.10 6.00 6.00a 6.00ax 7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg kbfasttip -- The information in this article applies to: - The C Run-time (CRT), included with: - Microsoft C for MS-DOS, versions 5.1, 6.0, 6.0a, and 6.0ax - Microsoft C/C++ for MS-DOS, versions 7.0 - Microsoft Visual C++ for Windows, versions 1.0 and 1.5 -- The following are possible reasons that _setvideomode might fail when attempting to set a video mode: - Some of the older IBM EGA (enhanced graphics adapter) cards only have 64K of video memory. As such, they cannot display the 640 x 350, 16 (_ERES16COLOR) color EGA mode. However, lower resolution modes may work correctly because they don't require that much memory. - There are EGA cards that have DIP switch settings to set the card into high or low resolution modes. Some BIOS ignore these DIP switches and set the mode to high resolution. However, the _setvideomode function does its own checking and may honor the DIP switch settings depending on the particular card. Setting the DIP switches properly for the high resolution modes should resolve the problem. - The video card may not support the requested mode. If the card does not support the mode, then _setvideomode cannot set it into that mode. - Many VGA cards have nonstandard extended modes that are unique to those cards. _setvideomode supports only standard video modes, and thus does not recognize the extended modes. - In C/C++ versions 7.0 and later some high resolution VGA modes are supported, but only if the correct VESA driver is loaded. This driver is a TSR program that must be loaded from the MS-DOS prompt before the program that sets the video mode is run. Additional reference words: kbinf 1.00 1.50 6.00 6.00a 6.00ax 7.00 setvideomode KBCategory: kbprg kbfasttip KBSubcategory: CRTIss GraphicsIss

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbCRT