From fb83aca503d1d34532288b73fe85b9857a677e88 Mon Sep 17 00:00:00 2001 From: David Webster Date: Mon, 8 Jan 2001 19:00:47 +0000 Subject: [PATCH] Fixes to resolve default Client Window painting when EVT_PAINT events are captured by derived classes downstream. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/frame.cpp | 8 ++++---- src/os2/window.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 9fd9d2423e..18fc488fd0 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -1030,10 +1030,10 @@ bool wxFrame::OS2Create( // if (!::WinSetWindowPos( m_hWnd ,HWND_TOP - ,nX + 20 - ,nY + 20 - ,nWidth - 60 - ,nHeight - 60 + ,nX // + 20 + ,nY // + 20 + ,nWidth // - 60 + ,nHeight // - 60 ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE | SWP_ZORDER )) { diff --git a/src/os2/window.cpp b/src/os2/window.cpp index c43e2576a0..eda3bf9747 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -2845,6 +2845,35 @@ bool wxWindow::HandlePaint() m_updateRegion = wxRegion(hRgn); vEvent.SetEventObject(this); + if (!GetEventHandler()->ProcessEvent(vEvent)) + { + HPS hPS; + + hPS = ::WinBeginPaint( GetHwnd() + ,NULLHANDLE + ,&vRect + ); + if(hPS) + { + ::GpiCreateLogColorTable( hPS + ,0L + ,LCOLF_CONSECRGB + ,0L + ,(LONG)wxTheColourDatabase->m_nSize + ,(PLONG)wxTheColourDatabase->m_palTable + ); + ::GpiCreateLogColorTable( hPS + ,0L + ,LCOLF_RGB + ,0L + ,0L + ,NULL + ); + + ::WinFillRect(hPS, &vRect, GetBackgroundColour().GetPixel()); + ::WinEndPaint(hPS); + } + } return (GetEventHandler()->ProcessEvent(vEvent)); } // end of wxWindow::HandlePaint -- 2.45.2