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

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1992, 1993 by Borland International
  3. //   source\owl\dc.cpp
  4. //   Implementation of TPaintDC
  5. //----------------------------------------------------------------------------
  6. #include <owl\owlpch.h>
  7. #include <owl\dc.h>
  8.  
  9. TPaintDC::TPaintDC(HWND wnd) : TDC()
  10. {
  11.   Wnd = wnd;
  12.   Handle = ::BeginPaint(Wnd, &Ps);
  13.   CheckValid();
  14. }
  15.  
  16. TPaintDC::~TPaintDC()
  17. {
  18.   RestoreObjects();
  19.   if (ShouldDelete)
  20.     ::EndPaint(Wnd, &Ps);
  21. }
  22.