Platform SDK: DirectX

IDirectDraw7::GetDisplayMode

The IDirectDraw7::GetDisplayMode method retrieves the current display mode.

HRESULT GetDisplayMode(
  LPDDSURFACEDESC2 lpDDSurfaceDesc2  
);

Parameters

lpDDSurfaceDesc2
Address of a DDSURFACEDESC2 structure to be filled with a description of the surface.

Return Values

If the method succeeds, the return value is DD_OK.

If it fails, the method can return one of the following error 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 IDirectDraw7::RestoreDisplayMode method to restore the mode on clean-up, thus avoiding mode-setting conflicts that could arise in a multiprocess environment.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in ddraw.h.

See Also

IDirectDraw7::SetDisplayMode, IDirectDraw7::RestoreDisplayMode, IDirectDraw7::EnumDisplayModes