Share via


IDirectDraw4::EnumDisplayModes (Windows CE 5.0)

Send Feedback

This method 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, LPDDSURFACEDESC2lpDDSurfaceDesc2,LPVOIDlpContext,LPDDENUMMODESCALLBACK2lpEnumModesCallback);

Parameters

  • dwFlags
    The following table shows the possible flags.

    Flag Description
    DDEDM_REFRESHRATES This flag numerates modes with different refresh rates.

    IDirectDraw4::EnumDisplayModes guarantees 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 CE.

    DDEDM_STANDARDVGAMODES This flag is not supported in Windows CE.
  • lpDDSurfaceDesc2
    Address of a DDSURFACEDESC2 structure 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 EnumModesCallback2 function 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:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS

Remarks

This method enumerates the dwRefreshRate member of the DDSURFACEDESC2 structure; the IDirectDraw::EnumDisplayModes method does not contain this capability.

If you use the IDirectDraw4::SetDisplayMode method to set the refresh rate of a new mode, you must use IDirectDraw4::EnumDisplayModes to enumerate the dwRefreshRate member.

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

Windows CE does not support DDEDM STANDARDVGAMODES.

Requirements

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Ddraw.h.
Link Library: Ddraw.lib.

See Also

IDirectDraw4::GetDisplayMode | IDirectDraw4::SetDisplayMode | IDirectDraw4::RestoreDisplayMode

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.