PlayEnhMetaFileRecord function (wingdi.h)

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


BOOL PlayEnhMetaFileRecord(
  [in] HDC                 hdc,
  [in] LPHANDLETABLE       pht,
  [in] const ENHMETARECORD *pmr,
  [in] UINT                cht


[in] hdc

A handle to the device context passed to the EnumEnhMetaFile function.

[in] pht

A pointer to a table of handles to GDI objects used when playing the metafile. The first entry in this table contains the enhanced-metafile handle.

[in] pmr

A pointer to the enhanced-metafile record to be played.

[in] cht

The number of handles in the handle table.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.


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.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also


Metafile Functions

Metafiles Overview