IDirect3D8::EnumAdapterModes

This method enumerates the display modes of an adapter.

HRESULT EnumAdapterModes(
  UINT Adapter,
  UINT Mode,
  D3DDISPLAYMODE* pMode
);

Parameters

  • Adapter
    [in] Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter.
  • Mode
    [in] Ordinal number that denotes the mode to enumerate. D3DCURRENT_DISPLAY_MODE is a special value denoting the current desktop display mode on this adapter and cannot be specified for this method. See Remarks.
  • pMode
    [in, out] Pointer to a D3DDISPLAYMODE structure, to be filled with information describing this mode. On error conditions, this value is zeroed.

Return Values

If the method succeeds, the return value is D3D_OK.

If Adapter or Mode is out of range, or pMode is invalid, this method returns D3DERR_INVALIDCALL.

Remarks

Some display drivers include refresh rate information that will greatly increase the number of modes. On older drivers, refresh rates of D3DADAPTER_DEFAULT are the only ones enumerated. Direct3D attempts to limit display modes and refresh rates based on the monitor capabilities, however there is still some risk that an enumerated mode will not be supported by the system's monitor. You may want to implement a display mode testing facility similar to that used by the Microsoft® Windows® Display Control Panel utility.

Use IDirect3D8::GetAdapterModeCount to determine the total number of modes supported by the system. Valid values for the Mode parameter range from 0 to the total number of modes minus 1.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

IDirect3D8::GetAdapterModeCount | D3DDISPLAYMODE | IDirect3D8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.