]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/window.cpp
Added chapter on collection and container classes to contents
[wxWidgets.git] / src / os2 / window.cpp
index 01de71dd154368b5b4d6c8ac1026c3f675368fc4..75900f1d950879a14dea0fb2b9d95dc1f07a31fd 100644 (file)
@@ -99,8 +99,8 @@ QMSG                      s_currentMsg;
 
 wxMenu*                   wxCurrentPopupMenu = NULL;
 extern wxList WXDLLEXPORT wxPendingDelete;
-#if defined(__VISAGECPP__) && (__IBMCPP__ < 400)
-extern wxChar*            wxCanvasClassName;
+#if !defined(__VISAGECPP__) || (__IBMCPP__ < 400)
+extern wxChar             wxCanvasClassName[];
 #endif
 wxList*                   wxWinHandleList = NULL;
 
@@ -1674,12 +1674,12 @@ bool wxWindow::OS2ProcessMessage(
                 }
             }
         }
+        //
+        // Let Dialogs process
+        //
+        if (::WinSendMsg(pQMsg->hwnd, WM_QUERYDLGCODE, pQMsg, 0));
+            return TRUE;
     }
-    //
-    // Let Dialogs process
-    //
-    if (::WinSendMsg(pQMsg->hwnd, WM_QUERYDLGCODE, pQMsg, 0));
-        return TRUE;
 
 #if wxUSE_TOOLTIPS
     if ( m_tooltip )
@@ -1699,7 +1699,7 @@ bool wxWindow::OS2TranslateMessage(
   WXMSG*                            pMsg
 )
 {
-    return m_acceleratorTable.Translate(this, pMsg);
+    return m_acceleratorTable.Translate(m_hWnd, pMsg);
 } // end of wxWindow::OS2TranslateMessage
 
 // ---------------------------------------------------------------------------
@@ -1813,7 +1813,7 @@ MRESULT EXPENTRY wxWndProc(
     {
         if (pWnd)
             rc = pWnd->OS2WindowProc(ulMsg, wParam, lParam);
-        else
+        if (!rc)
             rc = ::WinDefWindowProc(hWnd, ulMsg, wParam, lParam);
     }
     return rc;
@@ -1954,7 +1954,6 @@ MRESULT wxWindow::OS2WindowProc(
                 bProcessed = HandleMouseEvent(uMsg, x, y, (WXUINT)wParam);
             }
             break;
-
         case WM_SYSCOMMAND:
             bProcessed = HandleSysCommand(wParam, lParam);
             break;
@@ -2154,7 +2153,7 @@ MRESULT wxWindow::OS2WindowProc(
 
         // wxFrame specific message
         case WM_MINMAXFRAME:
-            bProcessed = HandleGetMinMaxInfo((PSWP)lParam);
+            bProcessed = HandleGetMinMaxInfo((PSWP)wParam);
             break;
 
         case WM_SYSVALUECHANGED:
@@ -2357,6 +2356,7 @@ bool wxWindow::OS2Create(
         (ULONG)zClass == (ULONG)WC_COMBOBOX ||
         (ULONG)zClass == (ULONG)WC_CONTAINER ||
         (ULONG)zClass == (ULONG)WC_ENTRYFIELD ||
+        (ULONG)zClass == (ULONG)WC_FRAME ||
         (ULONG)zClass == (ULONG)WC_LISTBOX ||
         (ULONG)zClass == (ULONG)WC_MENU ||
         (ULONG)zClass == (ULONG)WC_NOTEBOOK ||
@@ -2394,6 +2394,7 @@ bool wxWindow::OS2Create(
         wxLogError("Can't create window of class %s!. Error: %s\n", zClass, sError);
         return FALSE;
     }
+    ::WinSetWindowULong(m_hWnd, QWL_USER, (ULONG) this);
     wxWndHook = NULL;
 
 #ifdef __WXDEBUG__
@@ -2795,6 +2796,9 @@ void wxWindow::OnSysColourChanged(
 bool wxWindow::HandlePaint()
 {
     HRGN                            hRgn = NULLHANDLE;
+    wxPaintEvent                    vEvent;
+    HPS                             hPS;
+    RECTL                           vRect;
 
     if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_NULL)
     {
@@ -2803,7 +2807,9 @@ bool wxWindow::HandlePaint()
     }
     m_updateRegion = wxRegion(hRgn);
 
-    wxPaintEvent                    vEvent;
+    hPS = WinBeginPaint(GetHwnd(), 0L, &vRect);
+    WinFillRect(hPS, &vRect, SYSCLR_WINDOW);
+    WinEndPaint(hPS);
 
     vEvent.SetEventObject(this);
     return (GetEventHandler()->ProcessEvent(vEvent));