]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixes to resolve default Client Window painting when EVT_PAINT events are captured...
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 8 Jan 2001 19:00:47 +0000 (19:00 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 8 Jan 2001 19:00:47 +0000 (19:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/frame.cpp
src/os2/window.cpp

index 9fd9d2423e360b6a75f441f1615a351d96a4a2b6..18fc488fd0de9de3cb67bed1c723d97d23e03a3e 100644 (file)
@@ -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
                           ))
     {
index c43e2576a0e14fdb44d36b9fefb435b14c8f0fb6..eda3bf97476370985f892a1c755ab4aeb0cce6fe 100644 (file)
@@ -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