]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dcclient.cpp
Removed a deprecated wxBitmap constructor, and some
[wxWidgets.git] / src / os2 / dcclient.cpp
index 4bb99210df4473b43a20c10d1d57d4440e6e618e..083b902b3db14928f33c09e172ee46da0c926322 100644 (file)
@@ -319,12 +319,14 @@ wxPaintDC::wxPaintDC(
     {
         HPS                         hPS;
 
+        m_hDC = ::WinOpenWindowDC(GetWinHwnd(m_pCanvas));
         hPS = ::WinBeginPaint( GetWinHwnd(m_pCanvas)
                               ,NULLHANDLE
                               ,&g_paintStruct
                              );
         if(hPS)
         {
+            ::GpiAssociate(hPS, m_hDC);
             m_hOldPS = m_hPS;
             m_hPS = hPS;
             ::GpiCreateLogColorTable( m_hPS
@@ -349,7 +351,6 @@ wxPaintDC::wxPaintDC(
         }
 
         m_bIsPaintTime   = TRUE;
-        m_hDC = (WXHDC) -1; // to satisfy those anonizmous efforts
         ms_cache.Add(new wxPaintDCInfo(m_pCanvas, this));
     }
     InitDC();