Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CloseMetaFile function

The CloseMetaFile function closes a metafile device context and returns a handle that identifies a Windows-format metafile.

Note  This function is provided only for compatibility with Windows-format metafiles. Enhanced-format metafiles provide superior functionality and are recommended for new applications. The corresponding function for an enhanced-format metafile is CloseEnhMetaFile.

Syntax


HMETAFILE CloseMetaFile(
  _In_  HDC hdc
);

Parameters

hdc [in]

Handle to a metafile device context used to create a Windows-format metafile.

Return value

If the function succeeds, the return value is a handle to a Windows-format metafile.

If the function fails, the return value is NULL.

Remarks

To convert a Windows-format metafile into a new enhanced-format metafile, use the SetWinMetaFileBits function.

When an application no longer needs the Windows-format metafile handle, it should delete the handle by calling the DeleteMetaFile 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

See also

Metafiles Overview
Metafile Functions
CloseEnhMetaFile
CopyMetaFile
CreateMetaFile
DeleteMetaFile
EnumMetaFile
GetMetaFileBitsEx
PlayMetaFile
SetWinMetaFileBits

 

 

Build date: 6/12/2013

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.