Index: trunk/src/user32/win32wbase.cpp
===================================================================
--- trunk/src/user32/win32wbase.cpp	(revision 1243)
+++ trunk/src/user32/win32wbase.cpp	(revision 1245)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.33 1999-10-09 18:16:57 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.34 1999-10-11 15:26:05 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -912,8 +912,8 @@
         return 0; //todo
     case CMD_ACCELERATOR:
-      	// this fit not really windows behavior.
-      	// maybe TranslateAccelerator() is better
-      	dprintf(("accelerator command"));
-      	return SendInternalMessageA(WM_COMMAND, MAKELONG(Id, 0), 0);
+        // this fit not really windows behavior.
+        // maybe TranslateAccelerator() is better
+        dprintf(("accelerator command"));
+        return SendInternalMessageA(WM_COMMAND, MAKELONG(Id, 0), 0);
   }
   return 0;
@@ -1438,4 +1438,56 @@
 //******************************************************************************
 //******************************************************************************
+LRESULT Win32BaseWindow::DefWndControlColor(UINT ctlType, HDC hdc)
+{
+    //SvL: Set background color to default button color (not window (white))
+    if(ctlType == CTLCOLOR_BTN)
+    {
+        SetBkColor(hdc, GetSysColor(COLOR_BTNFACE));
+        SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT));
+        return GetSysColorBrush(COLOR_BTNFACE);
+    }
+    //SvL: Set background color to default dialog color if window is dialog
+    if((ctlType == CTLCOLOR_DLG || ctlType == CTLCOLOR_STATIC) && IsDialog()) {
+        SetBkColor(hdc, GetSysColor(COLOR_BTNFACE));
+        SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT));
+        return GetSysColorBrush(COLOR_BTNFACE);
+    }
+
+    if( ctlType == CTLCOLOR_SCROLLBAR)
+    {
+	    HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR);
+        COLORREF bk = GetSysColor(COLOR_3DHILIGHT);
+        SetTextColor( hdc, GetSysColor(COLOR_3DFACE));
+        SetBkColor( hdc, bk);
+
+//TODO?
+#if 0
+         /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
+          * we better use 0x55aa bitmap brush to make scrollbar's background
+          * look different from the window background.
+          */
+        if (bk == GetSysColor(COLOR_WINDOW)) {
+             return CACHE_GetPattern55AABrush();
+        }
+#endif
+    	UnrealizeObject( hb );
+        return (LRESULT)hb;
+    }
+
+    SetTextColor( hdc, GetSysColor(COLOR_WINDOWTEXT));
+
+	if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
+	{
+	    SetBkColor( hdc, GetSysColor(COLOR_WINDOW) );
+	}
+	else
+	{
+	    SetBkColor( hdc, GetSysColor(COLOR_3DFACE) );
+	    return (LRESULT)GetSysColorBrush(COLOR_3DFACE);
+	}
+    return (LRESULT)GetSysColorBrush(COLOR_WINDOW);
+}
+//******************************************************************************
+//******************************************************************************
 LRESULT Win32BaseWindow::DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam)
 {
@@ -1469,27 +1521,19 @@
         return(TRUE);
 
-    //SvL: Set background color to default button color (not window (white))
-    case WM_CTLCOLORBTN:
-        SetBkColor((HDC)wParam, GetSysColor(COLOR_BTNFACE));
-        SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
-        return GetSysColorBrush(COLOR_BTNFACE);
-
-    //SvL: Set background color to default dialog color if window is dialog
-    case WM_CTLCOLORDLG:
-    case WM_CTLCOLORSTATIC:
-        if(IsDialog()) {
-            SetBkColor((HDC)wParam, GetSysColor(COLOR_BTNFACE));
-            SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
-            return GetSysColorBrush(COLOR_BTNFACE);
-        }
-        //no break
-
     case WM_CTLCOLORMSGBOX:
     case WM_CTLCOLOREDIT:
     case WM_CTLCOLORLISTBOX:
+    case WM_CTLCOLORBTN:
+    case WM_CTLCOLORDLG:
+    case WM_CTLCOLORSTATIC:
     case WM_CTLCOLORSCROLLBAR:
-         SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
-         SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
-         return GetSysColorBrush(COLOR_BTNFACE);
+        return DefWndControlColor(Msg - WM_CTLCOLORMSGBOX, (HDC)wParam);
+
+    case WM_CTLCOLOR:
+	    return DefWndControlColor(HIWORD(lParam), (HDC)wParam);
+
+    case WM_VKEYTOITEM:
+    case WM_CHARTOITEM:
+	     return -1;
 
     case WM_PARENTNOTIFY:
@@ -2531,6 +2575,6 @@
  Win32BaseWindow *window;
 
-   if(hwnd == NULL && windowDesktop) 
-	return windowDesktop;
+   if(hwnd == NULL && windowDesktop)
+    return windowDesktop;
 
    if(HwGetWindowHandleData(hwnd, (DWORD *)&window) == TRUE) {
@@ -2597,5 +2641,5 @@
         if(window) {
                 return window->getWindowHandle();
-        }  
+        }
         else    return hwnd;    //OS/2 window handle
 }
Index: trunk/src/user32/win32wbase.h
===================================================================
--- trunk/src/user32/win32wbase.h	(revision 1243)
+++ trunk/src/user32/win32wbase.h	(revision 1245)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.h,v 1.16 1999-10-09 09:45:28 sandervl Exp $ */
+/* $Id: win32wbase.h,v 1.17 1999-10-11 15:26:06 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -155,5 +155,5 @@
          BOOL   IsIconic();
          HWND   GetWindow(UINT uCmd);
-         BOOL   EnableWindow(BOOL fEnable);
+ virtual BOOL   EnableWindow(BOOL fEnable);
          BOOL   CloseWindow();
   static HWND   GetActiveWindow();
@@ -189,4 +189,6 @@
        LRESULT  DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
 
+       LRESULT  DefWndControlColor(UINT ctlType, HDC hdc);
+
          void   NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam);
 
Index: trunk/src/user32/win32wdesktop.cpp
===================================================================
--- trunk/src/user32/win32wdesktop.cpp	(revision 1243)
+++ trunk/src/user32/win32wdesktop.cpp	(revision 1245)
@@ -1,3 +1,3 @@
-/* $Id: win32wdesktop.cpp,v 1.3 1999-10-09 19:12:03 sandervl Exp $ */
+/* $Id: win32wdesktop.cpp,v 1.4 1999-10-11 15:26:06 sandervl Exp $ */
 /*
  * Win32 Desktop Window for OS/2
@@ -60,4 +60,11 @@
 }
 //******************************************************************************
+//Disabling the desktop is not a good idea (mouse no longer responds)
+//******************************************************************************
+BOOL Win32Desktop::EnableWindow(BOOL fEnable)
+{
+  return TRUE; //of course we succeeded
+}
+//******************************************************************************
 //Dummy window procedure. Does nothing.
 //******************************************************************************
Index: trunk/src/user32/win32wdesktop.h
===================================================================
--- trunk/src/user32/win32wdesktop.h	(revision 1243)
+++ trunk/src/user32/win32wdesktop.h	(revision 1245)
@@ -1,3 +1,3 @@
-/* $Id: win32wdesktop.h,v 1.2 1999-10-09 18:16:57 sandervl Exp $ */
+/* $Id: win32wdesktop.h,v 1.3 1999-10-11 15:26:07 sandervl Exp $ */
 /*
  * Win32 Desktop Window for OS/2
@@ -23,4 +23,5 @@
 virtual ~Win32Desktop();
 
+ virtual BOOL   EnableWindow(BOOL fEnable);
 
 protected:
Index: trunk/src/user32/wndmsg.cpp
===================================================================
--- trunk/src/user32/wndmsg.cpp	(revision 1243)
+++ trunk/src/user32/wndmsg.cpp	(revision 1245)
@@ -1,3 +1,3 @@
-/* $Id: wndmsg.cpp,v 1.3 1999-09-15 23:19:03 sandervl Exp $ */
+/* $Id: wndmsg.cpp,v 1.4 1999-10-11 15:26:07 sandervl Exp $ */
 /*
  * Win32 window message text function for OS/2
@@ -162,4 +162,9 @@
     { "WM_USERCHANGED", WM_USERCHANGED, 0},                 // 0x54
     { "WM_NOTIFYFORMAT", WM_NOTIFYFORMAT, 0},               // 0x55
+    { "WM_STYLECHANGING", WM_STYLECHANGING, 0},             // 0x7C
+    { "WM_STYLECHANGED", WM_STYLECHANGED, 0},               // 0x7D
+    { "WM_DISPLAYCHANGE", WM_DISPLAYCHANGE, 0},             // 0x7E
+    { "WM_GETICON", WM_GETICON, 0},                         // 0x7F
+    { "WM_SETICON", WM_SETICON, 0},                         // 0x80
     { "WM_NCCREATE", WM_NCCREATE,                           // 0x0081
         MTF_TYPE_NC},
