Platform SDK: DirectX

D3DXGetVideoMode

The D3DXGetVideoMode function describes a particular video mode for this device.

HRESULT D3DXGetVideoMode(
  DWORD deviceIndex,
  DWORD flags,
  DWORD modeIndex,
  D3DX_VIDMODEDESC* pModeList
); 

Parameters

deviceIndex
An index value specifying the device. Using D3DX_DEFAULT for this parameter specifies the device with the highest acceleration level afforded on the primary surface.
flags
Refresh rates will be ignored unless the D3DX_GVM_REFRESHRATE flag is set by this parameter. If you want refresh rates to be ignored, set this parameter to 0.
modeIndex
A DWORD value specifying the device. Indexing begins at zero.
pModeList
A pointer to a D3DX_VIDMODEDESC structure that returns with a description of the display mode for the device.

Return Values

If the function succeeds, the return value is S_OK.

If the function fails, the return value may be one of the following values:

D3DXERR_D3DXNOTSTARTEDYET
D3DXERR_INITFAILED
D3DXERR_INVALIDD3DXDEVICEINDEX
D3DXERR_INVALIDPARAMETER
D3DXERR_NULLPOINTER

Remarks

Queries performed with the D3DXGetVideoMode function will simply give you a list of modes that the display adapter tells DirectX that it supports. There is no guarantee that the D3DXCreateContext or D3DXCreateContextEx functions will succeed with all of the listed video modes.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxcore.h.
  Library: Use d3dx.lib.

See Also

D3DXGetMaxNumVideoModes, D3DXGetMaxNumVideoModes