Export (0) Print
Expand All

Graphics.EnumerateMetafileProc Delegate

Provides a callback method for the EnumerateMetafile method.

[Visual Basic]
<Serializable>
<ComVisible(False)>
Public Delegate Function Sub Graphics.EnumerateMetafileProc( _
   ByVal recordType As EmfPlusRecordType, _
   ByVal flags As Integer, _
   ByVal dataSize As Integer, _
   ByVal data As IntPtr, _
   ByVal callbackData As PlayRecordCallback _
) As Boolean
[C#]
[Serializable]
[ComVisible(false)]
public delegate bool Graphics.EnumerateMetafileProc(
   EmfPlusRecordType recordType,
   int flags,
   int dataSize,
   IntPtr data,
   PlayRecordCallback callbackData
);
[C++]
[Serializable]
[ComVisible(false)]
public __gc __delegate bool Graphics.EnumerateMetafileProc(
   EmfPlusRecordType recordType,
   int flags,
   int dataSize,
   IntPtr data,
   PlayRecordCallback* callbackData
);

[JScript] In JScript, you can use the delegates in the .NET Framework, but you cannot define your own.

Parameters [Visual Basic, C#, C++]

The declaration of your callback method must have the same parameters as the Graphics.EnumerateMetafileProc delegate declaration.

recordType
Member of the EmfPlusRecordType enumeration that specifies the type of metafile record.
flags
Set of flags that specify attributes of the record.
dataSize
Number of bytes in the record data.
data
Pointer to a buffer that contains the record data.
callbackData
Not used.

Return Value

Return true if you want to continue enumerating records; otherwise, false.

Remarks

This method is used in conjunction with the EnumerateMetafile method of the Graphics class. Certain overloads of the EnumerateMetafile method call an application-defined callback method of this type for each record in a specified metafile. The callback function can display each record (or selected records) by calling the PlayRecord method of the Metafile that is being enumerated.

A user declaration of this callback method must have the same parameters as the Graphics.EnumerateMetafileProc delegate declaration.

Example

For an example see EnumerateMetafile.

Requirements

Namespace: System.Drawing

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Drawing (in System.Drawing.dll)

See Also

System.Drawing Namespace

Show:
© 2014 Microsoft