Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>closemetafile()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CloseMetaFile()
Close a metafile device context and return a metafile handle
------------------------------------------------------------------------------

Syntax
CloseMetaFile( <hDCMeta> )   -->   hMetaFile

Arguments
<hDCMeta> identifies the device context, originally created by
the CreateMetaFile() function, into which a sequence of GDI
function calls
was recorded.

Returns
If successful, a handle to the new metafile is returned (a non-
zero numeric).  Otherwise, zero is returned.

Description
This function closes the metafile device context used to
record a sequence of GDI function calls (using the <hDCMeta>
handle), and returns the handle of the new metafile.  You
should eventually release this handle by calling the
DeleteMetaFile() function.

Example
hDCMeta = CreateMetaFile( 0 )    // get a device context to record a metafile
MoveTo( hDCMeta, 50, 50 )
LineTo( hDCMeta, 150, 50 )         // draw a line
hMetaFile = CloseMetaFile( hDCMeta ) // close hDCMeta and convert to a
                                 // metafile handle
hDC = GetDC( hWnd )           // get device context of window hWnd
PlayMetaFile( hDC, hMetaFile )     // play the metafile

ReleaseDC( hWnd, hDC )        // free the device context
DeleteMetaFile( hMetaFile )

See Also: CreateMetaFile() DeleteMetaFile() PlayMetaFile()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson