This method of the DirectDraw Class enumerates all the display modes the hardware exposes through the DirectDraw object that are compatible with a provided surface description. If null is passed for the surface description, all exposed modes are enumerated.
public void enumDisplayModes(int d, DDSurfaceDesc s, IUnknown args, IEnumModesCallback fn);
d | This flag Can be DDEDM_REFRESHRATES. |
s | A DDSurfaceDesc object that will be checked against available modes. If the value of this parameter is null, all modes are enumerated. |
args | Application-defined data that will be passed to each enumeration member. |
fn | The callback interface containing the callback function that the enumeration procedure will call every time a match is found. |
This method enumerates the backBufferCount field of the DDSurfaceDesc class. If you use the setDisplayMode method to set the refresh rate of a new mode, you must use enumDisplayModes to enumerate the backBufferCount field.
getDisplayMode, setDisplayMode, restoreDisplayMode