Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GpiCopyMetaFile (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIMETAFILES
HMF GpiCopyMetaFile(hmfSrc)
HMF hmfSrc; /* handle of source metafile */
The GpiCopyMetaFile function creates a copy of the metafile identified by
hmfSrc and returns a handle for the new metafile. The new metafile can be
edited or deleted without affecting the original metafile.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hmfSrc Identifies the source metafile. The source metafile must have
been loaded previously using the GpiLoadMetaFile function or
created previously using the DevOpenDC and DevCloseDC functions.
Return Value
The return value is the handle of the new metafile if the function is
successful, or it is GPI_ERROR if an error occurred.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
the following:
PMERR_INV_HMF
Example
This example uses the GpiCopyMetaFile function to copy make a copy of the
metafile loaded using the GpiLoadMetaFile function.
HMF hmf1, hmf2;
GpiLoadMetaFile(hmf1, "sample.met"); /* load the metafile from disk */
hmf2 = GpiCopyMetaFile(hmf1); /* copy the metafile */
See Also
DevCloseDC, DevOpenDC, GpiLoadMetaFile
♦