This topic has not yet been rated - Rate this topic

CloseEnhMetaFile function

Applies to: desktop apps only

The CloseEnhMetaFile function closes an enhanced-metafile device context and returns a handle that identifies an enhanced-format metafile.

Syntax

HENHMETAFILE CloseEnhMetaFile(
  __in  HDC hdc
);

Parameters

hdc [in]

Handle to an enhanced-metafile device context.

Return value

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

If the function fails, the return value is NULL.

Remarks

An application can use the enhanced-metafile handle returned by the CloseEnhMetaFile function to perform the following tasks:

  • Display a picture stored in an enhanced metafile
  • Create copies of the enhanced metafile
  • Enumerate, edit, or copy individual records in the enhanced metafile
  • Retrieve an optional description of the metafile contents from the enhanced-metafile header
  • Retrieve a copy of the enhanced-metafile header
  • Retrieve a binary copy of the enhanced metafile
  • Enumerate the colors in the optional palette
  • Convert an enhanced-format metafile into a Windows-format metafile

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

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Metafiles Overview
Metafile Functions
CopyEnhMetaFile
CreateEnhMetaFile
DeleteEnhMetaFile
EnumEnhMetaFile
GetEnhMetaFileBits
GetWinMetaFileBits
PlayEnhMetaFile

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ