A display driver sets the display mode and registers for the display hardware whenever GDI calls the Enable and Disable functions. The driver is also responsible for saving and restoring the display mode and registers whenever Windows is switching between Windows applications and non-Windows applications.
A display driver prepares the display hardware for Windows whenever GDI calls the Enable function. To prepare the hardware, the display driver sets the display hardware to graphics mode and initializes the hardware registers as needed. This should include setting the refresh rate based on the current monitor. For more information on refresh rates, see About Refresh Rate Support. Although GDI calls the BitBlt function to clear the screen as Windows starts, many display drivers eliminate the possibility of the user seeing any random data by also clearing the screen as they initialize the display hardware.
A display driver restores the display hardware to a text mode whenever GDI calls the Disable function.
The display driver works with the Virtual Display Device (VDD) to reenable the display hardware for Windows high resolution (hi-res) mode after returning from a full-screen MS-DOS virtual machine. To accomplish this task, the display driver must call the VDD function VDD_DRIVER_REGISTER to register the function ResetHiResMode immediately after the Windows hi-res mode has been set by the display driver during initialization. ResetHiResMode is a required display driver function that is called by the VDD to place the screen back into Windows hi-res mode after a user switches away from a full screen MS-DOS session.
ResetHiResMode, VDD_DRIVER_REGISTER