home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / OWLSRC.PAK / PAINTDC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  728 b   |  38 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1992, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.5  $
  6. //
  7. // Implementation of TPaintDC, an encapsulation of client DCs used when
  8. // responding to paint messages
  9. //----------------------------------------------------------------------------
  10. #include <owl/pch.h>
  11. #if !defined(OWL_DC_H)
  12. # include <owl/dc.h>
  13. #endif
  14.  
  15. OWL_DIAGINFO;
  16.  
  17. //
  18. //
  19. //
  20. TPaintDC::TPaintDC(HWND hWnd)
  21. :
  22.   TDC()
  23. {
  24.   Wnd = hWnd;
  25.   Handle = ::BeginPaint(hWnd, &Ps);
  26.   CheckValid();
  27. }
  28.  
  29. //
  30. //
  31. //
  32. TPaintDC::~TPaintDC()
  33. {
  34.   RestoreObjects();
  35.   if (ShouldDelete)
  36.     ::EndPaint(Wnd, &Ps);
  37. }
  38.