Platform SDK: DirectX

DirectDraw7.GetDisplayMode

The DirectDraw7.GetDisplayMode method retrieves the current display mode.

object.GetDisplayMode(surface As DDSURFACEDESC2)

Parameters

object
Object expression that resolves to a DirectDraw7 object.
surface
DDSURFACEDESC2 type to be filled with a description of the surface display mode.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_UNSUPPORTEDMODE

Remarks

An application should not save the information returned by this method to restore the display mode on clean-up. The application should use the DirectDraw7.RestoreDisplayMode method to restore the mode on clean-up, thus avoiding mode-setting conflicts that could arise in a multiprocess environment.

See Also

DirectDraw7.SetDisplayMode, DirectDraw7.RestoreDisplayMode, DirectDraw7.GetDisplayModesEnum