CMetaFileDC Class |
Description
The class responsible for creating a metafile device context.
A metafile, also called a vector image, is an image that is stored as a sequence of drawing commands and settings. The commands and settings recorded in a Metafile object can be stored in memory or saved to a file or stream.
CMetaFileDC Members
Initialization and Assignment
Initialization and Assignment | |
CMetaFileDC | CMetaFileDC();Constructs a CMetaFileDC object. |
void Create(LPCTSTR lpszFilename = NULL);Creates a metafile and attaches it to the device context.
void CreateEnhanced(CDC* pDCRef, LPCTSTR lpszFileName, LPCRECT lpBounds, LPCTSTR lpszDescription);Creates an enhanced metafile and attaches it to the device context.
HMETAFILE Close();Closes the metafile.
HENHMETAFILE CloseEnhanced();Closes the enhanced metafile.
Base class Members
For base class members, refer to the members of CDC.
Remarks
To use the CMetaFileDC, create the CMetafileDC object, and then create the metafile or enhanced metafile. Enhanced metafiles are supported by all 32-bit and 64-bit Windows operating systems. These should be the default metafiles used by all modern windows applications.
Once the Metafile is closed the HMETAFILE or HENHMETADILE handle can be used to play the metafile. The handle returned by Close or CloesEnhanced should be deleted when it no longer required.
Refer to the Graphics Device Interface section of Using Win32++ for additional information on using this class.
Summary Information
Header file | gdi.h |
Win32/64 support | Yes |
WinCE support | Yes |