DirectX SDK

DirectDrawEnumModes

Applications use the methods of the DirectDrawEnumModes class to enumerate the computer's available video modes. This object is created and filled with data by the DirectDraw7.GetDisplayModesEnum method.

DirectDraw mode enumeration GetCount
  GetItem