Graphics::EnumerateMetafile(constMetafile,constPointF,INT,constRectF&,Unit,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(
  [in]      const Metafile        *metafile,
  [in]      const PointF          *destPoints,
  [in]      INT                   count,
  [in, ref] const RectF &         srcRect,
  [in]      Unit                  srcUnit,
  [in]      EnumerateMetafileProc callback,
  [in]      VOID                  *callbackData,
  [in]      const ImageAttributes *imageAttributes


[in] metafile

Type: const Metafile*

Pointer to a metafile to be enumerated.

[in] destPoints

Type: const Point*

Pointer to an array of destination points. This is an array of three points that defines the destination parallelogram for the displayed metafile.

[in] count

Type: INT

Integer that specifies the number of points in the destPoints array.

[in, ref] srcRect

Type: const RectF

Reference to the rectangle that specifies the portion of the metafile that is displayed.

[in] srcUnit

Type: Unit

Element of the Unit enumeration that specifies the unit of measure for the source rectangle.

[in] callback

Type: EnumerateMetafileProc

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

[in] callbackData

Type: VOID*

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

[in] imageAttributes

Type: 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