Export (0) Print
Expand All

CopyEnhMetaFile function

The CopyEnhMetaFile function copies the contents of an enhanced-format metafile to a specified file.

Syntax


HENHMETAFILE CopyEnhMetaFile(
  _In_  HENHMETAFILE hemfSrc,
  _In_  LPCTSTR lpszFile
);

Parameters

hemfSrc [in]

A handle to the enhanced metafile to be copied.

lpszFile [in]

A pointer to the name of the destination file. If this parameter is NULL, the source metafile is copied to memory.

Return value

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

Unicode and ANSI names

CopyEnhMetaFileW (Unicode) and CopyEnhMetaFileA (ANSI)

See also

Metafiles Overview
Metafile Functions
DeleteEnhMetaFile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft