Microsoft SDK for Java

setDisplayMode

This method of the DirectDraw Class sets the mode of the display-device hardware.

Syntax

public void setDisplayMode(int w, int h, int bpp, int ref, int mode);

Parameters

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.

Remarks

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.

See Also

restoreDisplayMode, getDisplayMode, enumDisplayModes, setCooperativeLevel

© 1999 Microsoft Corporation. All rights reserved. Terms of use.