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.
A version of this page is also available for
4/8/2010

This method enumerates all of the display modes the hardware exposes through the DirectDrawobject that are compatible with a provided surface description.

Syntax

HRESULT EnumDisplayModes( 
  DWORD
 dwFlags, 
  LPDDSURFACEDESC 
lpDDSurfaceDesc, 
  LPVOID 
lpContext, 
  LPDDENUMMODESCALLBACK 
lpEnumModesCallback
);

Parameters

dwFlags

The following table shows the possible flags.

Flag Description

DDEDM_REFRESHRATES

This flag numerates modes with different refresh rates.

IDirectDraw::EnumDisplayModesguarantees that a mode is enumerated only once.

This flag specifies whether the refresh rate is taken into account when determining if a mode is unique.

It is not possible to change an adapter's refresh rate in Windows Embedded CE.

DDEDM_STANDARDVGAMODES

This flag is not supported in Windows Embedded CE.

lpDDSurfaceDesc

Address of a DDSURFACEDESCstructure 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 EnumModesCallbackfunction that the enumeration procedure will call every time a match is found.

Return Value

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

For more information on these error codes see DirectDraw Return Values.

Remarks

This method enumerates the dwRefreshRatemember of the DDSURFACEDESCstructure; the IDirectDraw::EnumDisplayModesmethod does not contain this capability.

If you use the IDirectDraw::SetDisplayModemethod to set the refresh rate of a new mode, you must use IDirectDraw::EnumDisplayModesto enumerate the dwRefreshRatemember.

Windows Embedded CE does not support DDEDM STANDARDVGAMODES.

Requirements

Header ddraw.h
Library ddraw.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.