Index: trunk/src/user32/new/oslibwin.cpp
===================================================================
--- trunk/src/user32/new/oslibwin.cpp	(revision 328)
+++ trunk/src/user32/new/oslibwin.cpp	(revision 329)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.cpp,v 1.12 1999-07-18 14:39:35 sandervl Exp $ */
+/* $Id: oslibwin.cpp,v 1.13 1999-07-18 14:56:36 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -256,5 +256,5 @@
 //******************************************************************************
 //******************************************************************************
-BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect)
+BOOL OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect)
 {
  BOOL rc;
@@ -263,5 +263,5 @@
   rc = WinQueryUpdateRect(hwnd, (PRECTL)&rectl);
   if(rc) {
-	MapOS2ToWin32Rectl(hwnd, &rectl, pRect);
+    MapOS2ToWin32Rectl(hwnd, &rectl, (PRECT)pRect);
   }
   return rc;
Index: trunk/src/user32/new/oslibwin.h
===================================================================
--- trunk/src/user32/new/oslibwin.h	(revision 328)
+++ trunk/src/user32/new/oslibwin.h	(revision 329)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.h,v 1.11 1999-07-18 14:39:35 sandervl Exp $ */
+/* $Id: oslibwin.h,v 1.12 1999-07-18 14:56:36 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -184,5 +184,5 @@
 
 BOOL  OSLibWinDestroyWindow(HWND hwnd);
-BOOL  OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect);
+BOOL  OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect);
 BOOL  OSLibWinIsIconic(HWND hwnd);
 BOOL  OSLibWinSetActiveWindow(HWND hwnd);
Index: trunk/src/user32/new/pmwindow.cpp
===================================================================
--- trunk/src/user32/new/pmwindow.cpp	(revision 328)
+++ trunk/src/user32/new/pmwindow.cpp	(revision 329)
@@ -1,3 +1,3 @@
-/* $Id: pmwindow.cpp,v 1.9 1999-07-18 14:39:35 sandervl Exp $ */
+/* $Id: pmwindow.cpp,v 1.10 1999-07-18 14:56:36 sandervl Exp $ */
 /*
  * Win32 Window Managment Code for OS/2
@@ -84,5 +84,4 @@
  POSTMSG_PACKET *postmsg;
  Win32Window  *win32wnd;
- ULONG         magic;
  APIRET        rc;
 
@@ -90,8 +89,7 @@
   SetWin32TIB();
 
-  win32wnd = (Win32Window *)WinQueryWindowULong(hwnd, OFFSET_WIN32WNDPTR);
-  magic    = WinQueryWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
-
-  if(msg != WM_CREATE && win32wnd == NULL && magic != WIN32PM_MAGIC) {
+  win32wnd = Win32Window::GetWindowFromOS2Handle(hwnd);
+
+  if(msg != WM_CREATE && win32wnd == NULL) {
         dprintf(("Invalid win32wnd pointer for window %x!!", hwnd));
         goto RunDefWndProc;
Index: trunk/src/user32/new/user32.cpp
===================================================================
--- trunk/src/user32/new/user32.cpp	(revision 328)
+++ trunk/src/user32/new/user32.cpp	(revision 329)
@@ -1,3 +1,3 @@
-/* $Id: user32.cpp,v 1.6 1999-07-18 13:57:47 cbratschi Exp $ */
+/* $Id: user32.cpp,v 1.7 1999-07-18 14:56:36 sandervl Exp $ */
 
 /*
@@ -383,5 +383,4 @@
 BOOL WIN32API GetUpdateRect( HWND hWnd, PRECT lpRect, BOOL  bErase)
 {
-    OSRECTL rect;
     ULONG windowH;
     BOOL rc;
@@ -391,9 +390,7 @@
 #endif
     if (!lpRect) return FALSE;
+
     hWnd = Win32ToOS2Handle(hWnd);
-    rc = OSLibWinQueryUpdateRect(hWnd,&rect);
-    windowH = OSLibGetWindowHeight(hWnd);
-    OS2ToWin32Rect(lpRect,&rect,windowH);
-    return rc;
+    return OSLibWinQueryUpdateRect(hWnd, (PVOID)&lpRect);
 }
 //******************************************************************************
Index: trunk/src/user32/new/win32wnd.cpp
===================================================================
--- trunk/src/user32/new/win32wnd.cpp	(revision 328)
+++ trunk/src/user32/new/win32wnd.cpp	(revision 329)
@@ -1,3 +1,3 @@
-/* $Id: win32wnd.cpp,v 1.11 1999-07-18 14:39:35 sandervl Exp $ */
+/* $Id: win32wnd.cpp,v 1.12 1999-07-18 14:56:37 sandervl Exp $ */
 /*
  * Win32 Window Code for OS/2
@@ -666,5 +666,5 @@
 //******************************************************************************
 ULONG Win32Window::MsgMove(ULONG xParent, ULONG yParent)
-{  	
+{
   return SendInternalMessageA(WM_MOVE, 0, MAKELONG((USHORT)xParent, (USHORT)yParent));
 }
@@ -770,14 +770,14 @@
 
   if(keystate & WMMOVE_LBUTTON)
-  	winstate |= MK_LBUTTON;
+    winstate |= MK_LBUTTON;
   if(keystate & WMMOVE_RBUTTON)
-  	winstate |= MK_RBUTTON;
+    winstate |= MK_RBUTTON;
   if(keystate & WMMOVE_MBUTTON)
-  	winstate |= MK_MBUTTON;
+    winstate |= MK_MBUTTON;
   if(keystate & WMMOVE_SHIFT)
-  	winstate |= MK_SHIFT;
+    winstate |= MK_SHIFT;
   if(keystate & WMMOVE_CTRL)
-  	winstate |= MK_CONTROL;
-  	
+    winstate |= MK_CONTROL;
+
    return SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y));
 }
@@ -792,8 +792,8 @@
 ULONG Win32Window::MsgEraseBackGround(ULONG hps)
 {
- 	if(isIcon) {
- 			return SendInternalMessageA(WM_ICONERASEBKGND, hps, 0);
- 	}
-  	else	return SendInternalMessageA(WM_ERASEBKGND, hps, 0);
+    if(isIcon) {
+            return SendInternalMessageA(WM_ICONERASEBKGND, hps, 0);
+    }
+    else    return SendInternalMessageA(WM_ERASEBKGND, hps, 0);
 }
 //******************************************************************************
@@ -802,5 +802,5 @@
 {
   if(isUnicode) {
-    	return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz);
+        return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz);
   }
   else  return SendInternalMessageA(WM_SETTEXT, 0, (LPARAM)lpsz);
@@ -1469,3 +1469,18 @@
 //******************************************************************************
 //******************************************************************************
+Win32Window *Win32Window::GetWindowFromOS2Handle(HWND hwnd)
+{
+ Win32Window *win32wnd;
+ DWORD        magic;
+
+  win32wnd = (Win32Window *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);
+  magic    = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
+
+  if(win32wnd && CheckMagicDword(magic)) {
+    return win32wnd;
+  }
+  return 0;
+}
+//******************************************************************************
+//******************************************************************************
 GenericObject *Win32Window::windows  = NULL;
Index: trunk/src/user32/new/win32wnd.h
===================================================================
--- trunk/src/user32/new/win32wnd.h	(revision 328)
+++ trunk/src/user32/new/win32wnd.h	(revision 329)
@@ -1,3 +1,3 @@
-/* $Id: win32wnd.h,v 1.10 1999-07-18 14:39:35 sandervl Exp $ */
+/* $Id: win32wnd.h,v 1.11 1999-07-18 14:56:37 sandervl Exp $ */
 /*
  * Win32 Window Code for OS/2
@@ -125,4 +125,5 @@
 
 static Win32Window *GetWindowFromHandle(HWND hwnd);
+static Win32Window *GetWindowFromOS2Handle(HWND hwnd);
 
 protected:
