CloseMetaFile

  HMETAFILE CloseMetaFile(hdc)    
  HDC hdc; /* handle of metafile device-context */

The CloseMetaFile function closes the metafile device-context that is identified by hdc and returns a handle that identifies a windows-format metafile.

Parameters

hdc

Identifies a metafile device-context that was used to create a windows-format metafile.

Return Value

The return value identifies a windows-format metafile if the function is successful. Otherwise, it is 0.

Comments

This function is provided for compatibility purposes only. A windows-format metafile does not support the new curve, path, and transformation functions such as PolyBezier, BeginPath, and SetWorldTransform. Applications that use these new functions and use metafiles to store pictures created by these functions should call the enhanced-format metafile-functions instead.

An application can convert a windows-format metafile into a enhanced-format metafile by calling the SetWinMetaFileBits function.

When the application no longer needs the windows-format metafile handle, it should call the DeleteMetaFile function.

See Also

CopyMetaFile, CreateMetaFile, DeleteMetaFile, EnumMetaFile, GetMetaFileBitsEx, PlayMetaFile, SetWinMetaFileBits