This method of the DirectDraw Class sets the mode of the display-device hardware.
public void setDisplayMode(int w, int h, int bpp, int ref, int mode);
w | The width of the new mode. |
h | The height of the new mode. |
bpp | The bits per pixel of the new mode. |
ref | The refresh rate of the new mode. |
mode | Reserved; value must be 0. |
The setCooperativeLevel method must be used to set exclusive-level access before the mode can be changed. If other applications have created a DirectDrawSurface object on the primary surface and the mode is changed, those applications' primary surface objects return DDERR_SURFACELOST until they are restored.
restoreDisplayMode, getDisplayMode, enumDisplayModes, setCooperativeLevel