PlayEnhMetaFileRecord

The PlayEnhMetaFileRecord function plays an enhanced-metafile record by executing the graphics device interface (GDI) functions identified by the record.

BOOL PlayEnhMetaFileRecord(
  HDC hdc,                              // handle to device context
  LPHANDLETABLE lpHandletable,          // pointer to metafile handle table
  CONST ENHMETARECORD *lpEnhMetaRecord, // pointer to metafile record
  UINT nHandles                         // count of handles
);
 

Parameters

hdc
Handle to the device context passed to the EnumEnhMetaFile function.
lpHandletable
Pointer to a table of handles identifying GDI objects used when playing the metafile. The first entry in this table contains the enhanced-metafile handle.
lpEnhMetaRecord
Pointer to the enhanced-metafile record to be played.
nHandles
Specifies the number of handles in the handle table.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Windows NT: To get extended error information, call GetLastError.

Remarks

This is an enhanced-metafile function.

An application typically uses PlayEnhMetaFileRecord in conjunction with the EnumEnhMetaFile function to process and play an enhanced-format metafile one record at a time.

The hdc, lpHandletable, and nHandles parameters must be exactly those passed to the EnhMetaFileProc callback procedure by the EnumEnhMetaFile function.

If PlayEnhMetaFileRecord does not recognize a record, it ignores the record and returns TRUE.

Windows 95 and Windows 98: PlayEnhMetaFileRecord is subject to the limitations of the Windows 95 GDI. For example, Windows 95 supports only 16-bit signed coordinates. For records that contain 32-bit values, Windows 95 fails to play the record if the values are not in the range -32,768 to 32,767.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Metafiles Overview, Metafile Functions, EnumEnhMetaFile, PlayEnhMetaFile