Temporarily Using a Graphics Mode in Your Application

If your application can display all graphics images on separate screens, with no forms, menus, or text windows visible, you can use Vermont Views without GraphEx.

You can use vid_setmode() to access the graphics modes available on color adapters, but graphics modes are not supported by any of the display functions of Vermont Views unless you use GraphEx.

If you want to use graphics and Vermont Views in the same program, you can first save the text-mode screen using FULL_WNP, and then set a graphics mode. You must not attempt to use the Vermont Views output functions while in the graphics mode. When you are done with graphics, call vid_setmode() to set the text mode, and then restore the saved text screen.

The following code demonstrates these steps:

int tmode;
 
tmode = vid_getmode();
/* Save current mode
*/
wi_sav(FULL_WNP);
/* Save the current screen
*/
vid_setmode(6);

. . .
/* Set to graphics mode
*/
. . .

. . .
/* Your graphics functions
*/
vid_setmode(tmode);
/* Restore original text mode
*/
wi_unsav(FULL_WNP);
/* Restore text screen, free image
*/


Home Contents Previous Next