Graphics::EnumerateMetafile(constMetafile*,constPointF&,EnumerateMetafileProc,VOID*,constImageAttributes*) method (gdiplusgraphics.h)

The Graphics::EnumerateMetafile method calls an application-defined callback function for each record in a specified metafile. You can use this method to display a metafile by calling PlayRecord in the callback function.


Status EnumerateMetafile(
  const Metafile        *metafile,
  const PointF &        destPoint,
  EnumerateMetafileProc callback,
  VOID                  *callbackData,
  const ImageAttributes *imageAttributes



Type: [in] const Metafile*

Pointer to a metafile to be enumerated.


Type: [in, ref] const Point

Reference to a point that specifies the upper-left corner of the displayed metafile.


Type: [in] EnumerateMetafileProc

Pointer to an application-defined callback function. The prototype for the callback function is given in Gdiplustypes.h.


Type: [in] VOID*

Optional. Pointer to a block of data that is passed to the callback function. The default value is NULL.


Type: [in] ImageAttributes*

Optional. Pointer to an ImageAttributes object that specifies color adjustments for the displayed metafile. The default value is NULL.

Return value

Type: Status

If the method succeeds, it returns Ok, which is an element of the Status enumeration.

If the method fails, it returns one of the other elements of the Status enumeration.


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