CopyMetaFile

  HMETAFILE CopyMetaFile(hmfSrc, lpszFile)    
  HMETAFILE hmfSrc; /* handle of a windows-format metafile */
  LPTSTR lpszFile; /* address of a filename string */

The CopyMetaFile function copies the windows-format metafile that is identified by hmfSrc to the file that is identified by the string at which lpszFile points.

This function is included only for compatibility purposes. Applications are discouraged from using this function. The Windows metafile functions support only Windows 3.x functionalities and do not record or playback new GDI functions such as PolyBezier. New applications should use the enhanced metafile functions.

Parameters

hmfSrc

Identifies a windows-format metafile.

lpszFile

Points to a string that specifies the name of the file that is to receive the Windows metafile. If NULL, the source is copied to a memory-based Windows metafile.

Return Value

The return value identifies the newly created Windows metafile if the function is successful. Otherwise, it is NULL. Use the GetLastError function to obtain extended error information.

Comments

The CopyMetaFile function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set).

This is a Windows metafile function.

When the application no longer needs the Windows metafile handle, it should free the handle by calling the DeleteMetaFile function.

See Also

DeleteMetaFile