Index: trunk/src/user32/pmwindow.cpp
===================================================================
--- trunk/src/user32/pmwindow.cpp	(revision 7293)
+++ trunk/src/user32/pmwindow.cpp	(revision 7294)
@@ -1,3 +1,3 @@
-/* $Id: pmwindow.cpp,v 1.163 2001-10-29 13:54:39 achimha Exp $ */
+/* $Id: pmwindow.cpp,v 1.164 2001-11-07 15:36:09 sandervl Exp $ */
 /*
  * Win32 Window Managment Code for OS/2
@@ -247,4 +247,5 @@
 //******************************************************************************
 //CD notification window class
+#define TIMERID_DRIVEPOLL 	0x1717
 //******************************************************************************
 MRESULT EXPENTRY Win32CDWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
@@ -299,7 +300,7 @@
            drive[0]++;
         }
-        WinStartTimer(hab, hwnd, 17, 32*60);
-////        WinStartTimer(hab, hwnd, 17, 32*3);
-////        WinStartTimer(hab, hwnd, 17, 5000);
+        WinStartTimer(hab, hwnd, TIMERID_DRIVEPOLL, 32*60);
+////        WinStartTimer(hab, hwnd, TIMERID_DRIVEPOLL, 32*3);
+////        WinStartTimer(hab, hwnd, TIMERID_DRIVEPOLL, 5000);
         rc = (MRESULT)FALSE;
         break;
@@ -373,5 +374,5 @@
 
     case WM_DESTROY:
-        WinStopTimer(hab, hwnd, 17);
+        WinStopTimer(hab, hwnd, TIMERID_DRIVEPOLL);
         break;
 
Index: trunk/src/user32/scroll.cpp
===================================================================
--- trunk/src/user32/scroll.cpp	(revision 7293)
+++ trunk/src/user32/scroll.cpp	(revision 7294)
@@ -1,3 +1,3 @@
-/* $Id: scroll.cpp,v 1.45 2001-10-24 09:53:14 sandervl Exp $ */
+/* $Id: scroll.cpp,v 1.46 2001-11-07 15:36:10 sandervl Exp $ */
 /*
  * Scrollbar control
@@ -1269,4 +1269,6 @@
     dprintf(("USER32: SetScrollInfo %x %d",hwnd,nBar));
 
+    if(info == NULL) return 0; //Last error not changed (NT4, SP6)
+
     if (!(infoPtr = SCROLL_GetInfoPtr(hwnd,nBar))) return 0;
     if (info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)) return 0;
@@ -1347,5 +1349,5 @@
     {
       new_flags = infoPtr->flags;
-      if (infoPtr->MinVal >= infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 ))
+      if (infoPtr->MinVal >= infoPtr->MaxVal - MAX( infoPtr->Page-1, 0))
       {
         /* Hide or disable scroll-bar */
@@ -1539,4 +1541,5 @@
   SCROLLBAR_INFO *infoPtr;
 
+    dprintf(("GetScrollRange %x %d %x %x", hwnd, nBar, lpMin, lpMax));
     infoPtr = SCROLL_GetInfoPtr(hwnd,nBar);
     if (!infoPtr)
@@ -1665,4 +1668,6 @@
     return FALSE;
   }
+
+  dprintf(("GetScrollBarInfo %x %d %x", hwnd, idObject, psbi));
 
   INT nBar,arrowSize;
Index: trunk/src/user32/win32dlg.cpp
===================================================================
--- trunk/src/user32/win32dlg.cpp	(revision 7293)
+++ trunk/src/user32/win32dlg.cpp	(revision 7294)
@@ -1,3 +1,3 @@
-/* $Id: win32dlg.cpp,v 1.71 2001-10-28 10:38:13 sandervl Exp $ */
+/* $Id: win32dlg.cpp,v 1.72 2001-11-07 15:36:10 sandervl Exp $ */
 /*
  * Win32 Dialog Code for OS/2
@@ -1081,7 +1081,27 @@
 BOOL Win32Dialog::endDialog(int retval)
 {
+    HWND hwnd = getWindowHandle();
+
     dialogFlags |= DF_END;
     idResult = retval;
 
+//    BOOL wasEnabled = (dlgInfo.flags & DF_OWNERENABLED);
+
+//    if (wasEnabled && (owner = GetWindow( hwnd, GW_OWNER )))
+//        DIALOG_EnableOwner( owner );
+
+    /* Windows sets the focus to the dialog itself in EndDialog */
+
+    if (::IsChild(hwnd, GetFocus()))
+       ::SetFocus( hwnd );
+
+    /* Don't have to send a ShowWindow(SW_HIDE), just do
+       SetWindowPos with SWP_HIDEWINDOW as done in Windows */
+
+    ::SetWindowPos(hwnd, (HWND)0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE
+                 | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);
+
+    /* unblock dialog loop */
+    PostMessageA(hwnd, WM_NULL, 0, 0); 
     return TRUE;
 }
Index: trunk/src/user32/win32wbase.cpp
===================================================================
--- trunk/src/user32/win32wbase.cpp	(revision 7293)
+++ trunk/src/user32/win32wbase.cpp	(revision 7294)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.297 2001-10-28 10:38:13 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.298 2001-11-07 15:36:10 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -2471,4 +2471,5 @@
         return TRUE;
     }
+
 #if 0
     /* Fix redundant flags */
@@ -2483,6 +2484,6 @@
     }
 
-    if(cx < 0) cx = 0;
-    if(cy < 0) cy = 0;
+////    if(cx < 0) cx = 0;
+////    if(cy < 0) cy = 0;
 
     if((rectWindow.right - rectWindow.left == cx) && (rectWindow.bottom - rectWindow.top == cy)) {
@@ -2506,4 +2507,6 @@
         }
     }
+    /* TODO: Check hwndInsertAfter */
+
 #endif
 
@@ -2646,7 +2649,8 @@
          wpos->y      = rectWindow.top;
     }
-
+   
     WINDOWPOS wpOld = *wpos;
-    SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, (LPARAM)wpos);
+    if(!(wpos->flags & SWP_NOSENDCHANGING))
+        SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, (LPARAM)wpos);
 
     if ((wpos->hwndInsertAfter != wpOld.hwndInsertAfter) ||
@@ -3447,5 +3451,4 @@
 
   hwndActive = OSLibWinQueryActiveWindow();
-
   return OS2ToWin32Handle(hwndActive);
 }
