The EnumEnhMetaFile function enumerates the records within an enhanced-format metafile by retrieving each record and passing it to the specified callback function. The application-supplied callback function processes each record as required. The enumeration continues until the last record is processed or when the callback function returns zero.
BOOL EnumEnhMetaFile(
HDC hdc, // handle to device context
HENHMETAFILE hemf, // handle to enhanced metafile
ENHMFENUMPROC lpEnhMetaFunc, // pointer to callback function
LPVOID lpData, // pointer to callback-function data
CONST RECT *lpRect // pointer to bounding rectangle
);
If the callback function successfully enumerates all the records in the enhanced metafile, the return value is nonzero.
If the callback function does not successfully enumerate all the records in the enhanced metafile, the return value is zero.
Points along the edge of the rectangle pointed to by the lpRect parameter are included in the picture. If the hdc parameter is NULL, the system ignores lpRect.
If the callback function calls the PlayEnhMetaFileRecord function, hdc must identify a valid device context. The system uses the device context's transformation and mapping mode to transform the picture displayed by the PlayEnhMetaFileRecord function.
You can use the EnumEnhMetaFile function to embed one enhanced-metafile within another.
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.
Metafiles Overview, Metafile Functions, EnhMetaFileProc, PlayEnhMetaFile, PlayEnhMetaFileRecord, RECT