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>getmetafile()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetMetaFile()
Get a handle to a disk metafile
------------------------------------------------------------------------------

Syntax
GetMetaFile( <cMetaFile> )   -->   hMetaFile

Arguments
<cMetaFile> specifies the name of the metafile on disk.  It
should be a valid name of an existing file.

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

Description
This function creates a handle to an existing metafile.

Example
cFile := GetOpenFileName( , "*.wmf", "Select a metafile" )
if cFile != NIL
     if ( hMetaFile := GetMetaFile( cFile ) ) != 0
          hDC = GetDC( hWnd )
          PlayMetaFile( hDC, hMetaFile )     // play the metafile
          DeleteMetaFile( hMetaFile )        // free handle & resources
          ReleaseDC( hWnd, hDC )
     else
          MessageBox( hWnd, cFile + " is not a valid metafile", "Error", ;
                      MB_ICONEXCLAMATION + MB_OK )
     endif
endif

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

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