Microsoft DirectX 8.1 (C++) |
Enumerates the display modes of an adapter.
HRESULT EnumAdapterModes( UINT Adapter, UINT Mode, D3DDISPLAYMODE* pMode );
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.
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.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.