Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

memory_dc.hpp

00001 // memory_dc.hpp
00002 
00003 // Copyright (C) 2004 Steven Weiß (steven11@gmx.de)
00004 //
00005 // Permission to copy, use, sell and distribute this software is granted
00006 // provided this copyright notice appears in all copies.
00007 // Permission to modify the code and to distribute modified code is granted
00008 // provided this copyright notice appears in all copies, and a notice
00009 // that the code was modified is included with the copyright notice.
00010 //
00011 // This software is provided "as is" without express or implied warranty,
00012 // and with no claim as to its suitability for any purpose.
00013 
00014 
00015 #pragma once
00016 #include <background_wnd/detail/include.hpp>
00017 
00018 
00019 namespace win32 { namespace gui {
00020 
00021 namespace bg_wnd {
00022 
00023 class memory_dc
00024 {
00025 public:
00026      memory_dc(void);
00027      ~memory_dc(void);   
00028 
00029      operator HDC();
00030      
00031      void size(int cx, int cy);
00032      SIZE size() const;
00033 
00034      bool bitblt(HDC hDest, int x, int y, int cx, int cy, int xSrc = 0, int ySrc = 0, DWORD dwRop = SRCCOPY);
00035      void create_dc(HDC hDC, int cx, int cy);
00036      void delete_dc();   
00037      void swap(memory_dc& dc);
00038 
00039 private:  
00040      memory_dc(const memory_dc& dc);                        // don't allow copying
00041      void operator= (const memory_dc& dc);
00042 
00043      HDC hMemDC_;
00044      HBITMAP hOldBitmap_;     
00045 };
00046 
00047 }    // namespace bg_wnd
00048 } }  // namespace win32::gui



by Steven Weiss. You can contact me at steven11@gmx.de.