]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dcclient.cpp
Use InheritAttributes for wxGTK widgets so they will check
[wxWidgets.git] / src / os2 / dcclient.cpp
index 4bb99210df4473b43a20c10d1d57d4440e6e618e..9d33ade289043275e3472d29178d8c74bb32c4ae 100644 (file)
@@ -125,7 +125,7 @@ wxWindowDC::wxWindowDC(
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
-        wxLogError("Unable to set current color table. Error: %s\n", sError);
+        wxLogError("Unable to set current color table. Error: %s\n", sError.c_str());
     }
     ::GpiCreateLogColorTable( m_hPS
                              ,0L
@@ -225,7 +225,7 @@ wxClientDC::wxClientDC(
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
-        wxLogError("Unable to set current color table. Error: %s\n", sError);
+        wxLogError("Unable to set current color table. Error: %s\n", sError.c_str());
     }
     ::GpiCreateLogColorTable( m_hPS
                              ,0L
@@ -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();