Index: trunk/src/user32/new/dc.cpp
===================================================================
--- trunk/src/user32/new/dc.cpp	(revision 2435)
+++ trunk/src/user32/new/dc.cpp	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: dc.cpp,v 1.12 2000-01-13 20:11:36 sandervl Exp $ */
+/* $Id: dc.cpp,v 1.13 2000-01-14 14:45:15 sandervl Exp $ */
 
 /*
Index: trunk/src/user32/new/oslibwin.cpp
===================================================================
--- trunk/src/user32/new/oslibwin.cpp	(revision 2435)
+++ trunk/src/user32/new/oslibwin.cpp	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.cpp,v 1.36 2000-01-11 17:34:43 cbratschi Exp $ */
+/* $Id: oslibwin.cpp,v 1.37 2000-01-14 14:45:16 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -905,175 +905,7 @@
 //******************************************************************************
 //******************************************************************************
-BOOL OSLibWinEnableScrollBar(HWND hwndParent, int scrollBar, BOOL fEnable)
-{
- HWND hwndScroll;
-
-   if(scrollBar == OSLIB_VSCROLL) {
-        hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL);
-   }
-   else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL);
-
-   if(hwndScroll == NULL)
-        return FALSE;
-
-   return WinEnableWindow(hwndScroll, fEnable);
-}
-//******************************************************************************
-//******************************************************************************
 HWND OSLibWinQueryObjectWindow(VOID)
 {
   return WinQueryObjectWindow(HWND_DESKTOP);
-}
-//******************************************************************************
-//******************************************************************************
-ULONG OSLibWinGetScrollPos(HWND hwndParent, HWND hwndScroll)
-{
-   if(hwndScroll == NULL)
-        return 0;
-
-   return (ULONG)WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0);
-}
-//******************************************************************************
-//******************************************************************************
-ULONG OSLibWinSetScrollPos(HWND hwndParent, HWND hwndScroll, int pos, int fRedraw)
-{
- ULONG oldPos;
-
-   if(hwndScroll == NULL)
-        return 0;
-
-   oldPos = (ULONG)WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0);
-
-   if(WinSendMsg(hwndScroll, SBM_SETPOS, MPFROMSHORT(pos), MPFROMLONG(fRedraw)) == FALSE)
-        return 0;
-
-   return oldPos;
-}
-//******************************************************************************
-//******************************************************************************
-BOOL OSLibWinSetScrollRange(HWND hwndParent, HWND hwndScroll, int minpos,
-                            int maxpos, int fRedraw)
-{
-   if(hwndScroll == NULL)
-        return 0;
-
-   return (BOOL)WinSendMsg( hwndScroll, SBM_SETSCROLLBAR,
-                            MPFROMLONG(WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0)),
-                            MPFROM2SHORT( minpos ,maxpos ) );
-}
-//******************************************************************************
-//******************************************************************************
-BOOL OSLibWinSetScrollPageSize(HWND hwndParent, HWND hwndScroll, int pagesize,
-                               int totalsize, int fRedraw)
-{
-   if(hwndScroll == NULL)
-        return 0;
-
-   return (BOOL)WinSendMsg( hwndScroll, SBM_SETTHUMBSIZE,
-                            MPFROM2SHORT(pagesize, totalsize),
-                            0);
-}
-//******************************************************************************
-//******************************************************************************
-void OSLibTranslateScrollCmdAndMsg(ULONG *msg, ULONG *scrollcmd)
-{
-    switch(*scrollcmd)
-    {
-        case SB_LINEUP:
-               *scrollcmd = SB_LINEUP_W;
-               break;
-        case SB_LINEDOWN:
-               *scrollcmd = SB_LINEDOWN_W;
-               break;
-        case SB_PAGEUP:
-               *scrollcmd = SB_PAGEUP_W;
-               break;
-        case SB_PAGEDOWN:
-               *scrollcmd = SB_PAGEDOWN_W;
-               break;
-        case SB_SLIDERTRACK:
-               *scrollcmd = SB_THUMBTRACK_W;
-               break;
-        case SB_SLIDERPOSITION:
-               *scrollcmd = SB_THUMBPOSITION_W;
-               break;
-        case SB_ENDSCROLL:
-               *scrollcmd = SB_ENDSCROLL_W;
-               break;
-    }
-    *msg = (*msg == WM_HSCROLL) ? WM_HSCROLL_W : WM_VSCROLL_W;
-    return;
-}
-//******************************************************************************
-//******************************************************************************
-void OSLibSetWindowStyle(HWND hwnd, ULONG dwStyle, BOOL fTaskList)
-{
-  ULONG OSWinStyle, OSFrameStyle, borderWidth, borderHeight,dwExStyle;
-
-  OSLibWinConvertStyle(dwStyle, &dwExStyle, &OSWinStyle, &OSFrameStyle, &borderWidth, &borderHeight);
-
-  if(fTaskList)
-  {
-    OSFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
-  }
-
-//  OSWinStyle = OSWinStyle & ~(WS_TABSTOP | WS_GROUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
-  OSWinStyle = OSWinStyle & ~(WS_TABSTOP | WS_GROUP | WS_CLIPCHILDREN);
-
-  WinSetWindowULong(hwnd, QWL_STYLE,
-                    (WinQueryWindowULong(hwnd, QWL_STYLE) & ~0xffff0000) |
-                    OSWinStyle);
-
-  if(OSFrameStyle & FCF_TITLEBAR)
-  {
-      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_TITLEBAR), hwnd, FALSE);
-      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_MENU), hwnd, FALSE);
-  }
-  else
-  {
-      WinSetParent(WinWindowFromID(hwnd, FID_TITLEBAR), HWND_OBJECT, FALSE);
-      WinSetParent(WinWindowFromID(hwnd, FID_MENU), HWND_OBJECT, FALSE);
-  }
-  if(OSFrameStyle & FCF_SYSMENU)
-      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_SYSMENU), hwnd, FALSE);
-  else
-      WinSetParent(WinWindowFromID(hwnd, FID_SYSMENU), HWND_OBJECT, FALSE);
-
-  if((OSFrameStyle & FCF_MINBUTTON) || (OSFrameStyle & FCF_MAXBUTTON))
-      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_MINMAX), hwnd, FALSE);
-  else
-      WinSetParent(WinWindowFromID(hwnd, FID_MINMAX), HWND_OBJECT, FALSE);
-
-  if(OSFrameStyle & FCF_VERTSCROLL)
-      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_VERTSCROLL), hwnd, FALSE);
-  else
-      WinSetParent(WinWindowFromID(hwnd, FID_VERTSCROLL), HWND_OBJECT, FALSE);
-
-  if(OSFrameStyle & FCF_HORZSCROLL)
-      WinSetParent(OSLibWinObjectWindowFromID(hwnd, FID_HORZSCROLL), hwnd, FALSE);
-  else
-      WinSetParent(WinWindowFromID(hwnd, FID_HORZSCROLL), HWND_OBJECT, FALSE);
-
-#if 0
-  WNDPARAMS wndparam = {0};
-  FRAMECDATA framecdata = {0};
-
-  framecdata.cb = sizeof(FRAMECDATA);
-
-  wndparam.fsStatus  = WPM_CTLDATA;
-  wndparam.cbCtlData = framecdata.cb;
-  wndparam.pCtlData  = (PVOID)&framecdata;
-  WinSendMsg(hwnd, WM_QUERYWINDOWPARAMS, &wndparam, 0);
-
-  wndparam.fsStatus = WPM_CTLDATA;
-  wndparam.pCtlData = (PVOID)&framecdata;
-  framecdata.flCreateFlags = OSFrameStyle;
-  WinSendMsg(hwnd, WM_SETWINDOWPARAMS, &wndparam, 0);
-#endif
-
-  WinSendMsg(hwnd, WM_UPDATEFRAME,
-             MPFROMLONG(FCF_TITLEBAR | FCF_SYSMENU | FCF_MINMAX |
-                        FCF_MENU | FCF_VERTSCROLL | FCF_HORZSCROLL),
-             MPVOID);
 }
 //******************************************************************************
Index: trunk/src/user32/new/oslibwin.h
===================================================================
--- trunk/src/user32/new/oslibwin.h	(revision 2435)
+++ trunk/src/user32/new/oslibwin.h	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: oslibwin.h,v 1.29 2000-01-11 13:06:26 sandervl Exp $ */
+/* $Id: oslibwin.h,v 1.30 2000-01-14 14:45:16 sandervl Exp $ */
 /*
  * Window API wrappers for OS/2
@@ -259,16 +259,5 @@
 HWND  OSLibWinObjectWindowFromID(HWND hwndOwner, ULONG ID);
 
-#define OSLIB_HSCROLL   0
-#define OSLIB_VSCROLL   1
-BOOL  OSLibWinEnableScrollBar(HWND hwndParent, int scrollBar, BOOL fEnable);
 HWND  OSLibWinQueryObjectWindow(VOID);
-ULONG OSLibWinGetScrollPos(HWND hwndParent, HWND hwndScroll);
-ULONG OSLibWinSetScrollPos(HWND hwndParent, HWND hwndScroll, int pos, int fRedraw);
-BOOL  OSLibWinSetScrollRange(HWND hwndParent, HWND hwndScroll, int minpos,
-                             int maxpos, int fRedraw);
-BOOL  OSLibWinSetScrollPageSize(HWND hwndParent, HWND hwndScroll, int pagesize,
-                                int totalsize, int fRedraw);
-
-void  OSLibTranslateScrollCmdAndMsg(ULONG *msg, ULONG *scrollcmd);
 
 PVOID OSLibWinSubclassWindow(HWND hwnd,PVOID newWndProc);
Index: trunk/src/user32/new/pmwindow.cpp
===================================================================
--- trunk/src/user32/new/pmwindow.cpp	(revision 2435)
+++ trunk/src/user32/new/pmwindow.cpp	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: pmwindow.cpp,v 1.41 2000-01-14 13:16:57 sandervl Exp $ */
+/* $Id: pmwindow.cpp,v 1.42 2000-01-14 14:45:16 sandervl Exp $ */
 /*
  * Win32 Window Managment Code for OS/2
@@ -459,68 +459,2 @@
 //******************************************************************************
 //******************************************************************************
-MRESULT EXPENTRY Win32SubclassWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-  Win32BaseWindow* win32wnd;
-
-  //Restore our FS selector
-  SetWin32TIB();
-
-  win32wnd = Win32BaseWindow::GetWindowFromOS2Handle(hwnd);
-
-  if (!win32wnd)
-  {
-    dprintf(("Invalid win32wnd pointer for subclassed window %x!!", hwnd));
-    goto RunDefWndProc;
-  }
-
-  switch (msg)
-  {
-    case WM_WINDOWPOSCHANGED:
-      {
-        PSWP      pswp  = (PSWP)mp1;
-        SWP       swpOld = *(pswp + 1);
-        WINDOWPOS wp;
-        HWND      hParent = NULLHANDLE, hFrame = NULLHANDLE;
-
-        dprintf(("OS2Subclass: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));
-        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
-
-        hParent = hFrame = WinQueryWindow(hwnd, QW_PARENT);
-
-        OSLibMapSWPtoWINDOWPOS(pswp,&wp, &swpOld,hParent,hFrame);
-
-        win32wnd->setWindowRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
-        //win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);
-        wp.x = swpOld.x;
-        wp.y = swpOld.y;
-        wp.cx = swpOld.cx;
-        wp.cy = swpOld.cy;
-
-        wp.hwnd = win32wnd->getWindowHandle();
-
-        win32wnd->MsgPosChanged((LPARAM)&wp);
-
-        goto RunOldWndProc;
-      }
-
-    default:
-      goto RunDefHandler;
-  }
-
-RunDefWndProc:
-  RestoreOS2TIB();
-  return WinDefWindowProc(hwnd,msg,mp1,mp2);
-
-RunOldWndProc:
-  RestoreOS2TIB();
-  return ((PFNWP)win32wnd->getOldWndProc())(hwnd,msg,mp1,mp2);
-
-RunDefHandler:
-  RestoreOS2TIB();
-  return Win32WindowProc(hwnd,msg,mp1,mp2);
-}
-
-PVOID SubclassWithDefHandler(HWND hwnd)
-{
-  return WinSubclassWindow(hwnd,Win32SubclassWindowProc);
-}
Index: trunk/src/user32/new/win32wbase.cpp
===================================================================
--- trunk/src/user32/new/win32wbase.cpp	(revision 2435)
+++ trunk/src/user32/new/win32wbase.cpp	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.40 2000-01-14 13:16:58 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.41 2000-01-14 14:45:17 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -71,36 +71,4 @@
 //******************************************************************************
 //******************************************************************************
-Win32BaseWindow::Win32BaseWindow(HWND os2Handle,VOID* win32WndProc) : GenericObject(&windows,OBJTYPE_WINDOW)
-{
-  Init();
-  OS2Hwnd = OS2HwndFrame = os2Handle;
-  dwStyle = WS_VISIBLE;
-  setWindowProc((WNDPROC)win32WndProc);
-  fIsSubclassedOS2Wnd = TRUE;
-  fFirstShow = FALSE;
-  fCreated = TRUE;
-
-  SetLastError(0);
-
-  //CB: replace by a secure method
-
-  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
-        dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2Hwnd));
-        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
-        return;
-  }
-  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) {
-        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
-        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
-        return;
-  }
-
-  OSLibWinQueryWindowRect(OS2Hwnd,&rectClient,RELATIVE_TO_WINDOW);
-  OSLibWinQueryWindowRect(OS2Hwnd,&rectWindow,RELATIVE_TO_SCREEN);
-
-  setOldWndProc(SubclassWithDefHandler(OS2Hwnd));
-}
-//******************************************************************************
-//******************************************************************************
 Win32BaseWindow::Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode)
                         : GenericObject(&windows, OBJTYPE_WINDOW), ChildWindow()
@@ -115,5 +83,4 @@
 {
   isUnicode        = FALSE;
-  fIsSubclassedOS2Wnd = FALSE;
   fFirstShow       = TRUE;
   fIsDialog        = FALSE;
@@ -749,6 +716,4 @@
  Win32BaseWindow *child;
  HWND hwnd = getWindowHandle();
-
-    if (isSubclassedOS2Wnd) OSLibWinSubclassWindow(OS2Hwnd,pOldWndProc);
 
     fIsDestroyed = TRUE;
@@ -971,12 +936,5 @@
 
         /* Activate the window if needed */
-        if(isSubclassedOS2Wnd()) {
-                Win32BaseWindow *parentwnd = GetWindowFromOS2FrameHandle(OSLibWinQueryWindow(OS2Hwnd, QWOS_PARENT));
-                if(parentwnd) {
-                        hwndTop = (parentwnd->GetTopParent()) ? parentwnd->GetTopParent()->getWindowHandle() : 0;
-                }
-                else    hwndTop = 0;
-        }
-        else    hwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0;
+        hwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0;
 
         HWND hwndActive = GetActiveWindow();
@@ -1093,5 +1051,7 @@
     wndPos.hwndInsertAfter = 0;
     newWindowRect= rectWindow;
-    if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),&newWindowRect);
+    if (getParent()) {
+        mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),&newWindowRect);
+    }
     wndPos.x     = newWindowRect.left;
     wndPos.y     = newWindowRect.top;
@@ -1100,4 +1060,8 @@
     wndPos.flags = SWP_FRAMECHANGED;
     lpWndPos     = &wndPos;
+
+    if (getParent()) {
+        newWindowRect= rectWindow; //reset; was modified
+    }
   }
 
@@ -2739,6 +2703,5 @@
   if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000))
   {
-    //CB: update
-    //OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList);
+        FrameUpdateClient(this);
   }
 }
Index: trunk/src/user32/new/win32wbase.h
===================================================================
--- trunk/src/user32/new/win32wbase.h	(revision 2435)
+++ trunk/src/user32/new/win32wbase.h	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.h,v 1.27 2000-01-13 20:11:38 sandervl Exp $ */
+/* $Id: win32wbase.h,v 1.28 2000-01-14 14:45:18 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -95,5 +95,4 @@
 
                 Win32BaseWindow(DWORD objType);
-                Win32BaseWindow(HWND os2Handle,VOID* win32WndProc);
                 Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode);
 virtual        ~Win32BaseWindow();
@@ -294,5 +293,4 @@
        PVOID getOldWndProc() { return pOldWndProc; }
        VOID  setOldWndProc(PVOID aOldWndProc) { pOldWndProc = aOldWndProc; }
-       BOOL  isSubclassedOS2Wnd() { return fIsSubclassedOS2Wnd; };
 
 protected:
@@ -353,5 +351,4 @@
 
         PVOID   pOldWndProc;
-        BOOL    fIsSubclassedOS2Wnd;  //subclassed OS/2 window: Netscape plug-in/scrollbar
 
    Win32BaseWindow *owner;
Index: trunk/src/user32/new/windowword.cpp
===================================================================
--- trunk/src/user32/new/windowword.cpp	(revision 2435)
+++ trunk/src/user32/new/windowword.cpp	(revision 2437)
@@ -1,3 +1,3 @@
-/* $Id: windowword.cpp,v 1.5 2000-01-01 14:57:36 cbratschi Exp $ */
+/* $Id: windowword.cpp,v 1.6 2000-01-14 14:45:18 sandervl Exp $ */
 
 /*
@@ -26,28 +26,6 @@
       return window->SetWindowLongA(nIndex,lNewLong);
     }
-    else
-    {
-      if (nIndex == GWL_WNDPROC && !Win32BaseWindow::GetWindowFromOS2Handle(hwnd))
-      {
-        dprintf(("Start subclassing OS/2 window"));
-
-        window = new Win32BaseWindow(hwnd,(PVOID)lNewLong);
-
-        if(window == NULL)
-        {
-          dprintf(("Win32BaseWindow creation failed!!"));
-          return 0;
-        }
-
-        if(GetLastError() != 0)
-        {
-          dprintf(("Win32BaseWindow error found!!"));
-          delete window;
-          return 0;
-        }
-
-        return (LONG)window->getOldWndProc();
-      }
-      else dprintf(("SetWindowLongA; window %x not found!", hwnd));
+    else {
+	 dprintf(("SetWindowLongA; window %x not found!", hwnd));
     }
     return 0;
@@ -64,28 +42,6 @@
       return window->SetWindowLongA(nIndex,lNewLong, TRUE);
     }
-    else
-    {
-      if (nIndex == GWL_WNDPROC && !Win32BaseWindow::GetWindowFromOS2Handle(hwnd))
-      {
-        dprintf(("Start subclassing OS/2 window"));
-
-        window = new Win32BaseWindow(hwnd,(PVOID)lNewLong);
-
-        if(window == NULL)
-        {
-          dprintf(("Win32BaseWindow creation failed!!"));
-          return 0;
-        }
-
-        if(GetLastError() != 0)
-        {
-          dprintf(("Win32BaseWindow error found!!"));
-          delete window;
-          return 0;
-        }
-
-        return (LONG)window->getOldWndProc();
-      }
-      else dprintf(("SetWindowLongW; window %x not found!", hwnd));
+    else {
+	 dprintf(("SetWindowLongW; window %x not found!", hwnd));
     }
     return 0;
