IDirect3D9::EnumAdapterModes

A member of IDirect3D9 that queries the device to determine whether the specified adapter supports the requested format and display mode. This method could be used in a loop to enumerate all the available adapter modes.

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

Parameters
 Adapter -  Ordinal number that identifies the display adapter. Most likely will be D3DADAPTER_DEFAULT.

 Format -  A member of D3DFORMAT that shows the pixel format to use. It can be one of the following:
 * D3DFMT_A1R5G5B5
 * D3DFMT_A2R10G10B10
 * D3DFMT_A8R8G8B8
 * D3DFMT_R5G6B5
 * D3DFMT_X1R5G5B5
 * D3DFMT_X8R8G8B8

 Mode -  An unsigned integer that represents the display-mode index. It must be between 0 and IDirect3D9::GetAdapterModeCount - 1.

 pMode -  The pointer to the available display mode. It is a member of D3DDISPLAYMODE.

Return Values
If it succeeds, it will return D3D_OK. If a parameter is incorrect, it will return D3DERR_INVALIDCALL. If the display format given is incorrect for the computer, it will return D3DERR_NOTAVAILABLE.

Requirements
 Header -  d3d9.h

Library -  d3d9.lib