EnumerateDisplayModes
Applies to

TDirectDraw

Declaration

procedure EnumerateDisplayModes( Flags: DWord; pSurfaceDesc: PDDSURFACEDESC; List: TList );

Description

Calls the interface EnumDisplayModes method to enumerate all of the display modes the hardware exposes through the DirectDraw object that are compatible with a provided surface description.
For each display mode enumerated a TDisplayModeEnum record is allocated, defined and added to the List.
See IDirectDraw2::EnumDisplayModes for more information.

Note

You have to deallocate all records added to List by this function before destroying it. Here's a code sample:

For Cnt := 0 to List.Count-1 do
    FreeMem( PDisplayModeEnum( List[Cnt] ) );
List.Free;