Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
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.
class CMetaFileDC
◄CDC►                                         ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Description
 
  A Windows metafile contains a sequence of GDI commands that can be
  replayed to create a desired image or text.
 
  To implement a Windows metafile, first create a CMetaFileDC object.
 
  You create a CMetaFileDC in two steps. First, call the constructor
  CMetaFileDC to construct the CMetaFileDC object, then call the ◄Create►
  member function, which creates a Windows metafile device context and
  attaches it to the CMetaFileDC object.
 
  After the CMetaFileDC object is created, send a sequence of CDC GDI
  commands to the metafile device context. Use only those GDI commands
  that create output, such as MoveTo and LineTo.
 
  Then call the Close member function, which closes the metafile device
  context and returns a metafile handle. Use the CMetaFileDC destructor to
  destroy the CMetaFileDC object.
 
  ◄CDC::PlayMetaFile► can then use the metafile handle to play the
  metafile repeatedly, and the metafile can also be manipulated by Windows
  functions such as ◄CopyMetaFile►, which copies a metafile to disk.
 
  When the metafile is no longer needed, delete it from memory with the
  ◄DeleteMetaFile► Windows function.
 
  See Also
 
  ◄CDC►
 
  Public Members
 
  Construction/Destruction
 
  ◄CMetaFileDC►   Constructs a CMetaFileDC object.
 
  Initialization
 
  ◄Create►   Creates the Windows metafile device context and attaches it
             to the CMetaFileDC object.
 
  Operations
 
  ◄Close►               Closes the device context, and creates a metafile
                        handle.
 
  ◄SelectObject►        Selects a GDI drawing object into the specified
                        device context, which replaces the previous object
                        of the same type.
 
  ◄SelectStockObject►   Retrieves one of the predefined stock pens,
                        brushes, or fonts and causes the stock object to
                        become the currently selected object of its type.
 
 
                                     -♦-