CloseEnhMetaFile

  HENHMETAFILE CloseEnhMetaFile(hdc)    
  HDC hdc; /* handle of an enhanced-metafile device context */

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

Parameters

hdc

Identifies an enhanced-metafile device context.

Return Value

The return value is a handle that identifies an enhanced metafile if the function is successful. Otherwise, it is 0.

Comments

An application can use the enhanced metafile handle that was returned by this function to perform the tasks in the following list:

Display a picture that is 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 color-palette

When the application no longer needs the enhanced metafile handle, it should call the DeleteEnhMetaFile function.

See Also

CopyEnhMetaFile, CreateEnhMetaFile, DeleteEnhMetaFile, EnumEnhMetaFile, GetEnhMetaFileBits, PlayEnhMetaFile