Export (0) Print
Expand All

EnumMetaFile function

The EnumMetaFile function enumerates the records within a Windows-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.

Note  This function is provided only for compatibility with Windows-format metafiles. Enhanced-format metafiles provide superior functionality and are recommended for new applications. The corresponding function for an enhanced-format metafile is EnumEnhMetaFile.

Syntax


BOOL EnumMetaFile(
  _In_  HDC hdc,
  _In_  HMETAFILE hmf,
  _In_  MFENUMPROC lpMetaFunc,
  _In_  LPARAM lParam
);

Parameters

hdc [in]

Handle to a device context. This handle is passed to the callback function.

hmf [in]

Handle to a Windows-format metafile.

lpMetaFunc [in]

Pointer to an application-supplied callback function. For more information, see EnumMetaFileProc.

lParam [in]

Pointer to optional data.

Return value

If the callback function successfully enumerates all the records in the Windows-format metafile, the return value is nonzero.

If the callback function does not successfully enumerate all the records in the Windows-format metafile, the return value is zero.

Remarks

To convert a Windows-format metafile into an enhanced-format metafile, use the SetWinMetaFileBits function.

You can use the EnumMetaFile function to embed one Windows-format metafile within another.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Metafiles Overview
Metafile Functions
EnumEnhMetaFile
EnumMetaFileProc
PlayMetaFile
PlayMetaFileRecord
SetWinMetaFileBits

 

 

Community Additions

ADD
Show:
© 2014 Microsoft