PlayMetaFile

  BOOL PlayMetaFile(hdc, hmf)    
  HDC hdc; /* handle of the device context */
  HMETAFILE hmf; /* handle of the metafile */

The PlayMetaFile function plays the contents of the windows-format metafile identified by hmf on the device identified by hdc.

Parameters

hdc

Identifies a device context.

hmf

Identifies a windows-format metafile.

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE.

Comments

This function is provided for compatibility purposes only. A windows-format metafile does not support the new curve, path, and transformation functions such as PolyBezier, BeginPath, and SetWorldTransform. Applications that use these new functions and use metafiles to store pictures created by these functions should call the enhanced-format metafile-functions instead.

An application can convert a windows-format metafile into a enhanced-format metafile by calling the SetWinMetaFileBits function.

A windows-format metafile can be played multiple times.

A windows-format metafile can be embedded in a second windows-format metafile by calling the PlayMetaFile function and playing the source metafile into the device context for the target metafile.

Any object created but not deleted in the windows-format metafile is deleted by this function.

To abort this function, an application can call CancelDC from another thread to terminate the operation. In this case, the function will return FALSE.

See Also

CancelDC, SetWinMetaFileBits