Index: trunk/src/user32/oslibwin.cpp
===================================================================
--- trunk/src/user32/oslibwin.cpp	(revision 1184)
+++ trunk/src/user32/oslibwin.cpp	(revision 1186)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.cpp,v 1.15 1999-10-08 12:10:27 cbratschi Exp $ */
+/* $Id: oslibwin.cpp,v 1.16 1999-10-08 14:57:17 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -643,4 +643,19 @@
 {
    return WinCalcFrameRect(hwndFrame, (PRECTL)pRect, fClient);
+}
+//******************************************************************************
+//******************************************************************************
+BOOL OSLibGetMinMaxInfo(HWND hwndFrame, MINMAXINFO *pMinMax)
+{
+ TRACKINFO tinfo;
+
+   memset(&tinfo, 0, sizeof(TRACKINFO));
+   WinSendMsg(hwndFrame, WM_QUERYTRACKINFO, (MPARAM)0,(MPARAM)&tinfo);
+   
+   pMinMax->ptMinTrackSize.x = tinfo.ptlMinTrackSize.x;
+   pMinMax->ptMinTrackSize.y = tinfo.ptlMinTrackSize.y;
+   pMinMax->ptMaxTrackSize.x = tinfo.ptlMaxTrackSize.x;
+   pMinMax->ptMaxTrackSize.y = tinfo.ptlMaxTrackSize.y;
+   return TRUE;
 }
 //******************************************************************************
Index: trunk/src/user32/oslibwin.h
===================================================================
--- trunk/src/user32/oslibwin.h	(revision 1184)
+++ trunk/src/user32/oslibwin.h	(revision 1186)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.h,v 1.10 1999-10-07 23:21:30 sandervl Exp $ */
+/* $Id: oslibwin.h,v 1.11 1999-10-08 14:57:17 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -211,4 +211,5 @@
 BOOL  OSLibWinQueryWindowRect(HWND hwnd, PRECT pRect, int RelativeTo = RELATIVE_TO_WINDOW);
 BOOL  OSLibWinCalcFrameRect(HWND hwndFrame, RECTLOS2 *pRect, BOOL fClient);
+BOOL  OSLibGetMinMaxInfo(HWND hwndFrame, MINMAXINFO *pMinMax);
 
 #define QWOS_NEXT         0
Index: trunk/src/user32/pmwindow.cpp
===================================================================
--- trunk/src/user32/pmwindow.cpp	(revision 1184)
+++ trunk/src/user32/pmwindow.cpp	(revision 1186)
@@ -1,3 +1,3 @@
-/* $Id: pmwindow.cpp,v 1.21 1999-10-07 23:21:30 sandervl Exp $ */
+/* $Id: pmwindow.cpp,v 1.22 1999-10-08 14:57:17 sandervl Exp $ */
 /*
  * Win32 Window Managment Code for OS/2
@@ -298,5 +298,10 @@
         classStyle = win32wnd->getClass()->getStyle();
 
+#if 0
+        if ((yDelta != 0) && ((classStyle & CS_VREDRAW_W) ||
+           ((classStyle & CS_HREDRAW_W) && (pswp->cx != pswpo->cx))))
+#else
         if (yDelta != 0 || xDelta != 0)
+#endif
         {
             HENUM henum = WinBeginEnumWindows(pswp->hwnd);
@@ -321,6 +326,5 @@
 #endif
 
-                swp[i].cy += yDelta;
-                swp[i].fl  = SWP_SIZE;
+                swp[i].y += yDelta;
 
                 if (i == 9)
Index: trunk/src/user32/win32wbase.cpp
===================================================================
--- trunk/src/user32/win32wbase.cpp	(revision 1184)
+++ trunk/src/user32/win32wbase.cpp	(revision 1186)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.28 1999-10-08 12:10:27 cbratschi Exp $ */
+/* $Id: win32wbase.cpp,v 1.29 1999-10-08 14:57:18 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -339,9 +339,9 @@
     if (HOOK_IsHooked( WH_CBT ))
     {
-    CBT_CREATEWNDA cbtc;
+        CBT_CREATEWNDA cbtc;
         LRESULT ret;
 
-    cbtc.lpcs = cs;
-    cbtc.hwndInsertAfter = hwndLinkAfter;
+        cbtc.lpcs = cs;
+        cbtc.hwndInsertAfter = hwndLinkAfter;
         ret = unicode ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc)
                       : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc);
@@ -543,5 +543,5 @@
 
   fCreated = TRUE; //Allow WM_SIZE messages now
-  if(SendInternalMessage(WM_NCCREATE, 0, (LPARAM)cs) )
+  if(SendMessageA(WM_NCCREATE, 0, (LPARAM)cs) )
   {
         //doesn't work right, messes up client rectangle
@@ -551,5 +551,5 @@
         OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);
         dprintf(("Sending WM_CREATE"));
-        if( (SendInternalMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 )
+        if( (SendMessageA(WM_CREATE, 0, (LPARAM)cs )) != -1 )
         {
             if(!(flags & WIN_NEED_SIZE)) {
@@ -598,5 +598,5 @@
     if( dwStyle & WS_MINIMIZE )
     {
-        if( !SendInternalMessageA(WM_QUERYOPEN, 0, 0L ) )
+        if( !SendMessageA(WM_QUERYOPEN, 0, 0L ) )
         return (SWP_NOSIZE | SWP_NOMOVE);
         swpFlags |= SWP_NOCOPYBITS;
@@ -736,5 +736,5 @@
 //    }
 
-    SendInternalMessageA(WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );
+    SendMessageA(WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );
 
       /* Some sanity checks */
@@ -779,6 +779,6 @@
         params.lppos = &winposCopy;
    }
-   result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect,
-                                 (LPARAM)&params );
+   result = SendMessageA(WM_NCCALCSIZE, calcValidRect,
+                         (LPARAM)&params );
    *newClientRect = params.rgrc[0];
    return result;
@@ -821,4 +821,9 @@
 ULONG Win32BaseWindow::MsgEnable(BOOL fEnable)
 {
+    if(fEnable) {
+         dwStyle &= ~WS_DISABLED;
+    }
+    else dwStyle |= WS_DISABLED;
+
     return SendInternalMessageA(WM_ENABLE, fEnable, 0);
 }
@@ -1447,17 +1452,17 @@
     //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);
+        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()) {
+        if(IsDialog()) {
             SetBkColor((HDC)wParam, GetSysColor(COLOR_BTNFACE));
             SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
             return GetSysColorBrush(COLOR_BTNFACE);
-     }
-     //no break
+        }
+        //no break
 
     case WM_CTLCOLORMSGBOX:
@@ -1521,6 +1526,6 @@
             else if (dwStyle & WS_MINIMIZE) wp = SIZE_MINIMIZED;
 
-           SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right  - rectClient.left,
-                                              rectClient.bottom - rectClient.top));
+            SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right  - rectClient.left,
+                                               rectClient.bottom - rectClient.top));
         }
         return 0;
@@ -1828,7 +1833,7 @@
                 if(parentwindow) {
                         if(Msg == WM_CREATE || Msg == WM_DESTROY) {
-                                parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());
+                                parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());
                         }
-                        else    parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );
+                        else    parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );
                 }
         }
@@ -1886,6 +1891,6 @@
     dprintf(("Win32BaseWindow::SetIcon %x", hIcon));
     if(OSLibWinSetIcon(OS2HwndFrame, hIcon) == TRUE) {
-    SendInternalMessageA(WM_SETICON, hIcon, 0);
-    return TRUE;
+        SendMessageA(WM_SETICON, hIcon, 0);
+        return TRUE;
     }
     return FALSE;
@@ -1980,5 +1985,6 @@
            hParent = getParent()->getOS2WindowHandle();
            OSLibWinQueryWindowPos(OS2Hwnd, &swpOld);
-       } else
+       }
+       else
            OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
    }
@@ -2004,29 +2010,9 @@
       if (swp.cy < minTrack.y) swp.cy = minTrack.y;
 
-      RECTLOS2 rectFrame;
-
-      //Calculate correct frame rectangle from client rectangle
-      //NOTE: xLeft & yBottom can become too big
-      //Some programs use GetSystemMetrics 32/33 to determine offsets
-      rectFrame.xLeft   = swp.x;
-      rectFrame.yBottom = swp.y;
-      rectFrame.xRight  = swp.x + swp.cx;
-      rectFrame.yTop    = swp.y + swp.cy;
-
-      OSLibWinCalcFrameRect(OS2HwndFrame, &rectFrame, FALSE);     
-      swp.x  = rectFrame.xLeft;
-      swp.y  = rectFrame.yBottom;
-      swp.cx = rectFrame.xRight - rectFrame.xLeft;
-      swp.cy = rectFrame.yTop - rectFrame.yBottom;
-      if(swp.x < 0) {
-	swp.cx += -swp.x;
-	swp.x   = 0;
-      }
-      if(swp.y + swp.cy > ScreenHeight) {
-	swp.y = ScreenHeight - swp.cy;
-      }
       swp.hwnd = OS2HwndFrame;
-   } else
+   }
+   else
       swp.hwnd = OS2Hwnd;
+
    dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));
 
@@ -2035,5 +2021,4 @@
    if (rc == FALSE)
    {
-//      SET_ERROR_LAST();
    }
    else
@@ -2121,10 +2106,10 @@
         if (isIcon)
         {
-            SendInternalMessageA(WM_ICONERASEBKGND, (WPARAM)hdc, 0);
-            SendInternalMessageA(WM_PAINTICON, 0, 0);
+            SendMessageA(WM_ICONERASEBKGND, (WPARAM)hdc, 0);
+            SendMessageA(WM_PAINTICON, 0, 0);
         } else
         {
-            SendInternalMessageA(WM_ERASEBKGND, (WPARAM)hdc, 0);
-            SendInternalMessageA(WM_PAINT, 0, 0);
+            SendMessageA(WM_ERASEBKGND, (WPARAM)hdc, 0);
+            SendMessageA(WM_PAINT, 0, 0);
         }
         O32_ReleaseDC(OS2Hwnd, hdc);
@@ -2363,6 +2348,6 @@
         return FALSE;
 
-    if(windowNameA)     free(windowNameA);
-    if(windowNameW)     free(windowNameW);
+    if(windowNameA) free(windowNameA);
+    if(windowNameW) free(windowNameW);
 
     windowNameA = (LPSTR)_smalloc(strlen(lpsz)+1);
@@ -2384,6 +2369,6 @@
         return FALSE;
 
-    if(windowNameA)     free(windowNameA);
-    if(windowNameW)     free(windowNameW);
+    if(windowNameA) free(windowNameA);
+    if(windowNameW) free(windowNameW);
 
     windowNameW = (LPWSTR)_smalloc((lstrlenW((LPWSTR)lpsz)+1)*sizeof(WCHAR));
@@ -2406,28 +2391,28 @@
    switch(index) {
         case GWL_EXSTYLE:
-                {
-                  STYLESTRUCT ss;
-
-                  ss.styleOld = dwExStyle;
-                  ss.styleNew = value;
-                  SendInternalMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss);
-                  oldval = dwExStyle;
-                  setExStyle(value);
-                  SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss);
-                  return oldval;
-                }
+        {
+           STYLESTRUCT ss;
+
+                ss.styleOld = dwExStyle;
+                ss.styleNew = value;
+                SendMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss);
+                oldval = dwExStyle;
+                setExStyle(value);
+                SendMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss);
+                return oldval;
+        }
         case GWL_STYLE:
-                {
-                  STYLESTRUCT ss;
-
-                  ss.styleOld = dwStyle;
-                  ss.styleNew = value;
-                  SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
-                  oldval = dwStyle;
-                  setStyle(value);
-                  OSLibSetWindowStyle(OS2HwndFrame, dwStyle);
-                  SendInternalMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss);
-                  return oldval;
-                }
+        {
+           STYLESTRUCT ss;
+
+                ss.styleOld = dwStyle;
+                ss.styleNew = value;
+                SendMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
+                oldval = dwStyle;
+                setStyle(value);
+                OSLibSetWindowStyle(OS2HwndFrame, dwStyle);
+                SendMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss);
+                return oldval;
+        }
         case GWL_WNDPROC:
                 oldval = (LONG)getWindowProc();
