Microsoft Windows CE 3.0  

IDirectDraw4::EnumDisplayModes

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The IDirectDraw4::EnumDisplayModesmethod enumerates all of the display modes the hardware exposes through the DirectDraw object that are compatible with a provided surface description.

HRESULT EnumDisplayModes(
DWORD
dwFlags
,
LPDDSURFACEDESC2
lpDDSurfaceDesc2
,
LPVOID
lpContext
,
LPDDENUMMODESCALLBACK2
lpEnumModesCallback
);

Parameters

dwFlags
DDEDM_REFRESHRATES Enumerates modes with different refresh rates. IDirectDraw4::EnumDisplayModesguarantees that a particular mode will be enumerated only once. This flag specifies whether the refresh rate is taken into account when determining if a mode is unique.
DDEDM_STANDARDVGAMODES Enumerates Mode 13 in addition to the 320x200x8 Mode X mode.
lpDDSurfaceDesc2
Address of a DDSURFACEDESC2structure that will be checked against available modes. If the value of this parameter is NULL, all modes are enumerated.
lpContext
Address of an application-defined structure that will be passed to each enumeration member.
lpEnumModesCallback
Address of the EnumModesCallback2function that the enumeration procedure will call every time a match is found.

Return Values

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:

Remarks

This method enumerates the dwRefreshRatemember of the DDSURFACEDESC2structure; the IDirectDraw::EnumDisplayModesmethod does not contain this capability. If you use the IDirectDraw4::SetDisplayModemethod to set the refresh rate of a new mode, you must use IDirectDraw4::EnumDisplayModesto enumerate the dwRefreshRatemember.

This method differs from its counterparts in former interfaces in that it accepts the address of an EnumModesCallback2function as a parameter rather than an EnumModesCallbackfunction.

Windows CE does not support DDEDM STANDARDVGAMODES.

Requirements

Runs on Versions Declared in Link to
Windows CE OS 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. ddraw.h ddraw.lib

See Also

IDirectDraw4::GetDisplayMode, IDirectDraw4::SetDisplayMode, IDirectDraw4::RestoreDisplayMode