home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / owlsrc.pak / PAINTDC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-24  |  553 b   |  25 lines

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