The CopyEnhMetaFile function copies the contents of an enhanced-format metafile to a specified file.
HENHMETAFILE CopyEnhMetaFile(
HENHMETAFILE hemfSrc, // handle to an enhanced metafile
LPCTSTR lpszFile // pointer to a filename string
);
If the function succeeds, the return value is a handle to the copy of the enhanced metafile.
If the function fails, the return value is NULL.
Windows NT: To get extended error information, call GetLastError.
Where text arguments must use Unicode characters, use the CopyEnhMetaFile function as a wide-character function. Where text arguments must use characters from the Windows character set, use this function as an ANSI function.
Applications can use metafiles stored in memory for temporary operations.
When the application no longer needs the enhanced-metafile handle, it should delete the handle by calling the DeleteEnhMetaFile function.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Metafiles Overview, Metafile Functions, DeleteEnhMetaFile