]> git.saurik.com Git - wxWidgets.git/commitdiff
MemoryHDC can now be used to create DCs compatible with arbitrary DCs and not just...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 24 Mar 2003 22:32:56 +0000 (22:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 24 Mar 2003 22:32:56 +0000 (22:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/private.h

index 3bd6f49620225f84f06cdfbde55f9d547dc85df9..f932b0c2a5f0417880cc538274e1baaac268aef6 100644 (file)
@@ -362,13 +362,13 @@ private:
     DECLARE_NO_COPY_CLASS(ScreenHDC)
 };
 
-// the same as ScreenHDC but for memory DCs: creates the HDC in ctor and
-// destroys it in dtor
+// the same as ScreenHDC but for memory DCs: creates the HDC compatible with
+// the given one (screen by default) in ctor and destroys it in dtor
 class MemoryHDC
 {
 public:
-    MemoryHDC() { m_hdc = ::CreateCompatibleDC(NULL); }
-   ~MemoryHDC() { ::DeleteDC(m_hdc);                  }
+    MemoryHDC(HDC hdc) { m_hdc = ::CreateCompatibleDC(hdc); }
+   ~MemoryHDC() { ::DeleteDC(m_hdc); }
 
     operator HDC() const { return m_hdc; }