Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetEnhMetaFile function

The GetEnhMetaFile function creates a handle that identifies the enhanced-format metafile stored in the specified file.

Syntax


HENHMETAFILE GetEnhMetaFile(
  _In_ LPCTSTR lpszMetaFile
);

Parameters

lpszMetaFile [in]

A pointer to a null-terminated string that specifies the name of an enhanced metafile.

Return value

If the function succeeds, the return value is a handle to the enhanced metafile.

If the function fails, the return value is NULL.

Remarks

When the application no longer needs an enhanced-metafile handle, it should delete the handle by calling the DeleteEnhMetaFile function.

A Windows-format metafile must be converted to the enhanced format before it can be processed by the GetEnhMetaFile function. To convert the file, use the SetWinMetaFileBits function.

Where text arguments must use Unicode characters, use this function as a wide-character function. Where text arguments must use characters from the Windows character set, use this function as an ANSI function.

Examples

For an example, see Opening an Enhanced Metafile and Displaying Its Contents.

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

GetEnhMetaFileW (Unicode) and GetEnhMetaFileA (ANSI)

See also

Metafiles Overview
Metafile Functions
DeleteEnhMetaFile
GetEnhMetaFile
SetWinMetaFileBits

 

 

Show:
© 2016 Microsoft