X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e99762c031bf2c71af7f856c1d713bce0422acaa..89e3037cc9ef8b040f818f90b0a4c04a8fbda6c1:/src/os2/dcclient.cpp diff --git a/src/os2/dcclient.cpp b/src/os2/dcclient.cpp index a5cc0f7fee..bc20d8ac52 100644 --- a/src/os2/dcclient.cpp +++ b/src/os2/dcclient.cpp @@ -270,46 +270,18 @@ wxPaintDC::wxPaintDC( } else // not in cache, create a new one { - SIZEL vSizl = { 0,0}; HPS hPS; - HRGN hRgn; - memset(&g_paintStruct, '\0', sizeof(RECTL)); - if (!::WinQueryUpdateRect(GetWinHwnd(m_pCanvas), &g_paintStruct)) - { - wxLogLastError("CreateRectRgn"); -// return; - } - m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(m_pCanvas)); - m_hPS = ::GpiCreatePS( wxGetInstance() - ,m_hDC - ,&vSizl - ,PU_PELS | GPIF_LONG | GPIA_ASSOC - ); - - // Set the wxWindows color table - ::GpiCreateLogColorTable( m_hPS - ,0L - ,LCOLF_CONSECRGB - ,0L - ,(LONG)wxTheColourDatabase->m_nSize - ,(PLONG)wxTheColourDatabase->m_palTable - ); - ::GpiCreateLogColorTable( m_hPS - ,0L - ,LCOLF_RGB - ,0L - ,0L - ,NULL - ); - -#if 0 hPS = ::WinBeginPaint( GetWinHwnd(m_pCanvas) ,NULLHANDLE ,&g_paintStruct ); if(hPS) { + POINTL vPoint[2]; + LONG lControl; + LONG lColor; + m_hOldPS = m_hPS; m_hPS = hPS; ::GpiCreateLogColorTable( m_hPS @@ -326,12 +298,15 @@ wxPaintDC::wxPaintDC( ,0L ,NULL ); + + ::WinFillRect(hPS, &g_paintStruct, m_pCanvas->GetBackgroundColour().GetPixel()); + ::WinQueryWindowRect( GetWinHwnd(m_pCanvas) + ,&m_vRclPaint + ); } -#endif m_bIsPaintTime = TRUE; m_hDC = (WXHDC) -1; // to satisfy those anonizmous efforts - m_vRclPaint = g_paintStruct; ms_cache.Add(new wxPaintDCInfo(m_pCanvas, this)); } SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID));