home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 11.ddi / OWLSRC.PAK / METAFLDC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  676 b   |  24 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1992, 1993 by Borland International
  3. //   source\owl\dc.cpp
  4. //   Implementation of DC encapsulation classes
  5. //----------------------------------------------------------------------------
  6. #include <owl\owlpch.h>
  7. #include <owl\dc.h>
  8.  
  9. TMetaFileDC::TMetaFileDC(const char far* filename) : TDC()
  10. {
  11.   Handle = ::CreateMetaFile(filename);
  12.   CheckValid();
  13. }
  14.  
  15. TMetaFileDC::~TMetaFileDC()
  16. {
  17.   if (Handle) {
  18.     if (ShouldDelete)
  19.       // Do not restore objects, Metafiles cleanup after themselves
  20.       ::DeleteMetaFile(Close());
  21.     Handle = 0;
  22.   }
  23. }
  24.