Hi Dave,
Welcome to NewsGroup!
A metafile consists of a sequence of 32-bit GDI commands.The fundamental
way to create an enhanced metafile is by recording a series of GDI
commands. Two GDI functions are provided to start and finish the recording
of an enhanced metafile.
HDC CreateEnhMetaFile(HDC hdcRef, LPCTSTR lpFileName,
CONST RECT * lpRect, LPCTSTR lpDescription);
HENHMETAFILE CloseEnhMetaFile(HDC hDC);
Function CreateEnhMetaFile creates a special device context, which will be
used to record an enhanced metafile. So CreateEnhMetaFile only sets the
stage for creating an enhanced metafile, in the same way BeginPath starts
the construction of a GDI path object. The first parameter, hdcRef, refers
to a reference device context, whose device information will be queried to
record the EMF. If NULL is passed as hdcRef, GDI uses the current display
device for reference. The second parameter, lpFileName, can be a disk file
name or a NULL pointer. If a valid file name is given, a file version of
the metafile is written to disk when construction is complete. If NULL is
given, a metafile is memory based.
The following article is about how to create an Enhanced Metafile and
including relevant sample code. I hope it's useful for you,
Title: Creating an Enhanced Metafile
URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/met
afile_13s5.asp
If you have any questions or concerns, please feel free to let me know.
Thanks! : )
Best Regards,
Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)