The IDirectDraw4::GetDisplayMode method retrieves the current display mode.
HRESULT GetDisplayMode(
LPDDSURFACEDESC2 lpDDSurfaceDesc2
);
If the method succeeds, the return value is DD_OK.
If the method fails, the return value may be one of the following error values:
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_UNSUPPORTEDMODE |
An application should not save the information returned by this method to restore the display mode on clean-up. The application should use the IDirectDraw4::RestoreDisplayMode method to restore the mode on clean-up, thereby avoiding mode-setting conflicts that could arise in a multiprocess environment.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in ddraw.h.
Import Library: Use ddraw.lib.
IDirectDraw4::SetDisplayMode, IDirectDraw4::RestoreDisplayMode, IDirectDraw4::EnumDisplayModes