Index: trunk/src/comctl32/initterm.cpp
===================================================================
--- trunk/src/comctl32/initterm.cpp	(revision 130)
+++ trunk/src/comctl32/initterm.cpp	(revision 131)
@@ -1,3 +1,3 @@
-/* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:38 sandervl Exp $ */
+/* $Id: initterm.cpp,v 1.4 1999-06-20 14:02:12 sandervl Exp $ */
 /*
  * COMDLG32 DLL entry point
@@ -110,6 +110,4 @@
          break;
       case 1 :
-         /* unregister Win32 window classes */
-         UnregisterCOMCTL32WindowClasses();
          break;
       default  :
@@ -126,4 +124,7 @@
 static void APIENTRY cleanup(ULONG ulReason)
 {
+   /* unregister Win32 window classes */
+   UnregisterCOMCTL32WindowClasses();
+
    _ctordtorTerm();
    CRT_term();
Index: trunk/src/peldr/pe.cpp
===================================================================
--- trunk/src/peldr/pe.cpp	(revision 130)
+++ trunk/src/peldr/pe.cpp	(revision 131)
@@ -1,3 +1,3 @@
-/* $Id: pe.cpp,v 1.3 1999-06-19 10:54:46 sandervl Exp $ */
+/* $Id: pe.cpp,v 1.4 1999-06-20 14:02:13 sandervl Exp $ */
 
 /*
@@ -23,8 +23,9 @@
 #include <string.h>
 #include <assert.h>
-#include "win32type.h"
-#include "misc.h"
-#include "winexe.h"
-#include "windll.h"
+#include <win32type.h>
+#include <misc.h>
+#include <winexe.h>
+#include <windll.h>
+#include <wprocess.h>
 
 char INFO_BANNER[]      = "Usage: PE winexe commandline";
@@ -103,4 +104,5 @@
   }
   WinExe->start();
+
   delete WinExe;
 
Index: trunk/src/user32/Makefile
===================================================================
--- trunk/src/user32/Makefile	(revision 130)
+++ trunk/src/user32/Makefile	(revision 131)
@@ -1,3 +1,3 @@
-# $Id: Makefile,v 1.4 1999-06-19 10:54:46 sandervl Exp $
+# $Id: Makefile,v 1.5 1999-06-20 14:02:13 sandervl Exp $
 
 #
@@ -32,5 +32,5 @@
 $(TARGET).dll: $(OBJS) $(TARGET).def
         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
-              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/gdi32.lib $(PDWIN32_LIB)/kernel32.lib libuls.lib
+              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/gdi32.lib $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/libuls.lib
         $(CP) $@ $(PDWIN32_BIN)
 
Index: trunk/src/user32/user32.cpp
===================================================================
--- trunk/src/user32/user32.cpp	(revision 130)
+++ trunk/src/user32/user32.cpp	(revision 131)
@@ -1,3 +1,3 @@
-/* $Id: user32.cpp,v 1.7 1999-06-12 20:44:07 cbratschi Exp $ */
+/* $Id: user32.cpp,v 1.8 1999-06-20 14:02:13 sandervl Exp $ */
 
 /*
@@ -545,5 +545,5 @@
                                  int       nWidth,
                                  int       nHeight,
-                                 HWND      arg9,
+                                 HWND      parent,
                                  HMENU     arg10,
                                  HINSTANCE arg11,
@@ -557,49 +557,23 @@
         arg3 = (LPCSTR)"CRASH, CRASH";
 
-//SvL: This break generic.exe & notepad.exe (probably many others too)
-//These parameters can be CW_USEDEFAULT, which is 0x80000000
-#if 0
-  if (nWidth < 0) nWidth  = 0;
-  if (x      < 0) x       = 0;
-  if (nHeight< 0) nHeight = 0;
-  if (y      < 0) y       = 0;
-#endif
-
-// 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
-// Problems with group boxes
-
-#ifndef WS_CLIPCHILDREN
-  #define WS_CLIPCHILDREN            0x20000000L
-#endif
-
-  dwStyle |= WS_CLIPCHILDREN;
-
-//SvL: Breaks applications
-#if 0
-  /* @@@PH 98/06/21 redraw problems disappear when WS_SYNCPAINT is on */
-#ifndef WS_VISIBLE
-  #define WS_VISIBLE                 0x80000000L
-#endif
-
-#ifndef WS_SYNCPAINT
-  #define WS_SYNCPAINT               0x02000000L
-#endif
-
-#ifndef WS_CLIPSYBLINGS
-  #define WS_CLIPSYBLINGS            0x10000000L
-#endif
-
-  dwStyle |= WS_SYNCPAINT;
-
-  /* @@@PH 98/06/21 experimental fix for WinHlp32 */
-  // SOL.EXE crashes here, but WINHLP32 does not display the
-  // navigation buttons otherwise.
-  dwStyle |= WS_VISIBLE;
-#endif
+  // 6-12-99 CB: WS_CLIPCHILDREN not set -> controls not redrawn
+  // Problems with group boxes
+
+  //SvL: Correct window style (like Wine does) instead
+  if(dwStyle & WS_CHILD) {
+	dwStyle |= WS_CLIPSIBLINGS;
+	if(!(dwStyle & WS_POPUP)) {
+		dwStyle |= WS_CAPTION;
+	}
+  }
+  if(dwExStyle & WS_EX_DLGMODALFRAME)
+  {
+	dwStyle &= ~WS_THICKFRAME;
+  }
 
 #ifdef DEBUG
     WriteLog("USER32:  CreateWindow: dwExStyle = %X\n", dwExStyle);
     if((int)arg2 >> 16 != 0)
-     WriteLog("USER32:  CreateWindow: classname = %s\n", arg2);
+     	 WriteLog("USER32:  CreateWindow: classname = %s\n", arg2);
     else WriteLog("USER32:  CreateWindow: classname = %X\n", arg2);
     WriteLog("USER32:  CreateWindow: windowname= %s\n", arg3);
@@ -609,5 +583,5 @@
     WriteLog("USER32:  CreateWindow: nWidth    = %d\n", nWidth);
     WriteLog("USER32:  CreateWindow: nHeight   = %d\n", nHeight);
-    WriteLog("USER32:  CreateWindow: parent    = %X\n", arg9);
+    WriteLog("USER32:  CreateWindow: parent    = %X\n", parent);
     WriteLog("USER32:  CreateWindow: hwmenu    = %X\n", arg10);
     WriteLog("USER32:  CreateWindow: hinstance = %X\n", arg11);
@@ -640,5 +614,5 @@
                           nWidth,
                           nHeight,
-                          arg9,
+                          parent,
                           arg10,
                           arg11,
@@ -653,4 +627,11 @@
         window->SetWindowHandle(hwnd);
     }
+    //SvL: Taken from Wine
+    if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
+    {
+	/* Notify the parent window only */
+	SendMessageA(parent, WM_PARENTNOTIFY, MAKEWPARAM(WM_CREATE, 0), (LPARAM)hwnd );
+    }
+
     dprintf(("USER32:  ************CreateWindowExA %s (%d,%d,%d,%d), hwnd = %X\n", arg2, x, y, nWidth, nHeight, hwnd));
     return(hwnd);
Index: trunk/src/user32/wndclass.cpp
===================================================================
--- trunk/src/user32/wndclass.cpp	(revision 130)
+++ trunk/src/user32/wndclass.cpp	(revision 131)
@@ -1,3 +1,3 @@
-/* $Id: wndclass.cpp,v 1.3 1999-06-10 16:50:37 phaller Exp $ */
+/* $Id: wndclass.cpp,v 1.4 1999-06-20 14:02:13 sandervl Exp $ */
 
 /*
@@ -709,5 +709,5 @@
  Win32WindowClass     *wclass;
 
-#ifdef DEBUG1
+#ifdef DEBUG
   dprintf(("OS2ToWinCallback for message %s", GetMsgText(Msg)));
 #endif
Index: trunk/src/user32/wndproc.cpp
===================================================================
--- trunk/src/user32/wndproc.cpp	(revision 130)
+++ trunk/src/user32/wndproc.cpp	(revision 131)
@@ -1,13 +1,11 @@
-/* $Id: wndproc.cpp,v 1.4 1999-06-10 16:50:37 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
+/* $Id: wndproc.cpp,v 1.5 1999-06-20 14:02:13 sandervl Exp $ */
+
 /*
  * Win32 window procedure class for OS/2
  *
  * Copyright 1998 Sander van Leeuwen
+ *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
  *
  */
