Moved most builtin controls structures into their respective C file.
Created new controls.h file private to user32.dll and moved remaining
builtin controls definitions there.

diff --git a/windows/Makefile.in b/windows/Makefile.in
index 036b1c7..be747dd 100644
--- a/windows/Makefile.in
+++ b/windows/Makefile.in
@@ -4,6 +4,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = windows
+EXTRAINCL = -I$(TOPSRCDIR)/dlls/user
 
 C_SRCS = \
 	caret.c \
diff --git a/windows/class.c b/windows/class.c
index ff15fa4..05d41ff 100644
--- a/windows/class.c
+++ b/windows/class.c
@@ -22,6 +22,7 @@
 #include "wine/unicode.h"
 #include "heap.h"
 #include "win.h"
+#include "controls.h"
 #include "dce.h"
 #include "ldt.h"
 #include "toolhelp.h"
@@ -348,27 +349,26 @@
  * Register a builtin control class.
  * This allows having both ASCII and Unicode winprocs for the same class.
  */
-ATOM CLASS_RegisterBuiltinClass( LPCSTR name, DWORD style, INT winExtra, LPCSTR cursor,
-                                 HBRUSH brush, WNDPROC wndProcA, WNDPROC wndProcW )
+ATOM CLASS_RegisterBuiltinClass( const struct builtin_class_descr *descr )
 {
     ATOM atom;
     CLASS *classPtr;
 
-    if (!(atom = GlobalAddAtomA( name ))) return 0;
+    if (!(atom = GlobalAddAtomA( descr->name ))) return 0;
 
-    if (!(classPtr = CLASS_RegisterClass( atom, 0, style, 0, winExtra )))
+    if (!(classPtr = CLASS_RegisterClass( atom, 0, descr->style, 0, descr->extra )))
     {
         GlobalDeleteAtom( atom );
         return 0;
     }
 
-    classPtr->hCursor       = LoadCursorA( 0, cursor );
-    classPtr->hbrBackground = brush;
+    classPtr->hCursor       = LoadCursorA( 0, descr->cursor );
+    classPtr->hbrBackground = descr->brush;
 
-    if (wndProcA) WINPROC_SetProc( &classPtr->winprocA, (HWINDOWPROC)wndProcA,
-                                   WIN_PROC_32A, WIN_PROC_CLASS );
-    if (wndProcW) WINPROC_SetProc( &classPtr->winprocW, (HWINDOWPROC)wndProcW,
-                                   WIN_PROC_32W, WIN_PROC_CLASS );
+    if (descr->procA) WINPROC_SetProc( &classPtr->winprocA, (HWINDOWPROC)descr->procA,
+                                       WIN_PROC_32A, WIN_PROC_CLASS );
+    if (descr->procW) WINPROC_SetProc( &classPtr->winprocW, (HWINDOWPROC)descr->procW,
+                                       WIN_PROC_32W, WIN_PROC_CLASS );
     return atom;
 }
 
diff --git a/windows/defdlg.c b/windows/defdlg.c
index 3958570..990a89c 100644
--- a/windows/defdlg.c
+++ b/windows/defdlg.c
@@ -9,7 +9,7 @@
 #include "winbase.h"
 #include "wingdi.h"
 #include "wine/winuser16.h"
-#include "dialog.h"
+#include "controls.h"
 #include "win.h"
 #include "winproc.h"
 
diff --git a/windows/dialog.c b/windows/dialog.c
index ecbc93d..51e0363 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -18,8 +18,7 @@
 #include "wine/winuser16.h"
 #include "wine/winbase16.h"
 #include "wine/unicode.h"
-#include "dialog.h"
-#include "drive.h"
+#include "controls.h"
 #include "heap.h"
 #include "win.h"
 #include "user.h"
@@ -79,6 +78,21 @@
 static WORD xBaseUnit = 0, yBaseUnit = 0;
 
 
+/*********************************************************************
+ * dialog class descriptor
+ */
+const struct builtin_class_descr DIALOG_builtin_class =
+{
+    DIALOG_CLASS_ATOM,  /* name */
+    CS_GLOBALCLASS | CS_SAVEBITS, /* style  */
+    DefDlgProcA,        /* procA */
+    DefDlgProcW,        /* procW */
+    DLGWINDOWEXTRA,     /* extra */
+    IDC_ARROWA,         /* cursor */
+    0                   /* brush */
+};
+
+
 /***********************************************************************
  *           DIALOG_EnableOwner
  *
@@ -2216,7 +2230,6 @@
 static INT DIALOG_DlgDirList( HWND hDlg, LPSTR spec, INT idLBox,
                                 INT idStatic, UINT attrib, BOOL combo )
 {
-    int drive;
     HWND hwnd;
     LPSTR orig_spec = spec;
 
@@ -2227,16 +2240,8 @@
     TRACE("%04x '%s' %d %d %04x\n",
                     hDlg, spec ? spec : "NULL", idLBox, idStatic, attrib );
 
-    if (spec && spec[0] && (spec[1] == ':'))
-    {
-        drive = toupper( spec[0] ) - 'A';
-        spec += 2;
-        if (!DRIVE_SetCurrentDrive( drive )) return FALSE;
-    }
-    else drive = DRIVE_GetCurrentDrive();
-
     /* If the path exists and is a directory, chdir to it */
-    if (!spec || !spec[0] || DRIVE_Chdir( drive, spec )) spec = "*.*";
+    if (!spec || !spec[0] || SetCurrentDirectoryA( spec )) spec = "*.*";
     else
     {
         char *p, *p2;
@@ -2247,7 +2252,7 @@
         {
             char sep = *p;
             *p = 0;
-            if (!DRIVE_Chdir( drive, spec ))
+            if (!SetCurrentDirectoryA( spec ))
             {
                 *p = sep;  /* Restore the original spec */
                 return FALSE;
@@ -2256,8 +2261,7 @@
         }
     }
 
-    TRACE("path=%c:\\%s mask=%s\n",
-                    'A' + drive, DRIVE_GetDosCwd(drive), spec );
+    TRACE( "mask=%s\n", spec );
 
     if (idLBox && ((hwnd = GetDlgItem( hDlg, idLBox )) != 0))
     {
@@ -2286,11 +2290,8 @@
 
     if (idStatic && ((hwnd = GetDlgItem( hDlg, idStatic )) != 0))
     {
-        char temp[512];
-        int drive = DRIVE_GetCurrentDrive();
-        strcpy( temp, "A:\\" );
-        temp[0] += drive;
-        lstrcpynA( temp + 3, DRIVE_GetDosCwd(drive), sizeof(temp)-3 );
+        char temp[MAX_PATH];
+        GetCurrentDirectoryA( sizeof(temp), temp );
         CharLowerA( temp );
         /* Can't use PostMessage() here, because the string is on the stack */
         SetDlgItemTextA( hDlg, idStatic, temp );
diff --git a/windows/mdi.c b/windows/mdi.c
index f6056d9..bd2e2df 100644
--- a/windows/mdi.c
+++ b/windows/mdi.c
@@ -77,10 +77,8 @@
 #include "win.h"
 #include "heap.h"
 #include "nonclient.h"
-#include "mdi.h"
+#include "controls.h"
 #include "user.h"
-#include "menu.h"
-#include "scroll.h"
 #include "struct32.h"
 #include "tweak.h"
 #include "debugtools.h"
@@ -88,8 +86,37 @@
 
 DEFAULT_DEBUG_CHANNEL(mdi);
 
+#define MDI_MAXLISTLENGTH       0x40
+#define MDI_MAXTITLELENGTH      0xa1
+
+#define MDI_NOFRAMEREPAINT      0
+#define MDI_REPAINTFRAMENOW     1
+#define MDI_REPAINTFRAME        2
+
+#define WM_MDICALCCHILDSCROLL   0x10ac /* this is exactly what Windows uses */
+
+/* "More Windows..." definitions */
+#define MDI_MOREWINDOWSLIMIT    9       /* after this number of windows, a "More Windows..." 
+                                           option will appear under the Windows menu */
+#define MDI_IDC_LISTBOX         100
+#define MDI_IDS_MOREWINDOWS     13
+
 #define MDIF_NEEDUPDATE		0x0001
 
+typedef struct
+{
+    UINT      nActiveChildren;
+    HWND      hwndChildMaximized;
+    HWND      hwndActiveChild;
+    HMENU     hWindowMenu;
+    UINT      idFirstChild;
+    LPWSTR    frameTitle;
+    UINT      nTotalCreated;
+    UINT      mdiFlags;
+    UINT      sbRecalc;   /* SB_xxx flags for scrollbar fixup */
+    HWND      self;
+} MDICLIENTINFO;
+
 static HBITMAP16 hBmpClose   = 0;
 static HBITMAP16 hBmpRestore = 0;
 
@@ -102,6 +129,7 @@
 
 static HWND MDI_MoreWindowsDialog(WND*);
 static void MDI_SwapMenuItems(WND *, UINT, UINT);
+static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam );
 /* -------- Miscellaneous service functions ----------
  *
  *			MDI_GetChildByID
@@ -124,6 +152,22 @@
     ci->sbRecalc = recalc;
 }
 
+
+/*********************************************************************
+ * MDIClient class descriptor
+ */
+const struct builtin_class_descr MDICLIENT_builtin_class =
+{
+    "MDIClient",            /* name */
+    CS_GLOBALCLASS,         /* style */
+    MDIClientWndProcA,      /* procA */
+    NULL,                   /* procW (FIXME) */
+    sizeof(MDICLIENTINFO),  /* extra */
+    IDC_ARROWA,             /* cursor */
+    COLOR_APPWORKSPACE+1    /* brush */
+};
+
+
 /**********************************************************************
  *			MDI_MenuModifyItem
  */
@@ -1190,12 +1234,11 @@
 
 
 /**********************************************************************
- *					MDIClientWndProc
+ *					MDIClientWndProcA
  *
  * This function handles all MDI requests.
  */
-LRESULT WINAPI MDIClientWndProc( HWND hwnd, UINT message, WPARAM wParam,
-                                 LPARAM lParam )
+static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
 {
     LPCREATESTRUCTA	 cs;
     MDICLIENTINFO       *ci;
diff --git a/windows/message.c b/windows/message.c
index 49c0eed..ee656a0 100644
--- a/windows/message.c
+++ b/windows/message.c
@@ -26,7 +26,7 @@
 #include "selectors.h"
 #include "thread.h"
 #include "options.h"
-#include "menu.h"
+#include "controls.h"
 #include "struct32.h"
 #include "debugtools.h"
 
diff --git a/windows/nonclient.c b/windows/nonclient.c
index 9cfc809..54be17c 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -14,12 +14,10 @@
 #include "user.h"
 #include "heap.h"
 #include "dce.h"
+#include "controls.h"
 #include "cursoricon.h"
-#include "dialog.h"
-#include "menu.h"
 #include "winpos.h"
 #include "hook.h"
-#include "scroll.h"
 #include "nonclient.h"
 #include "queue.h"
 #include "selectors.h"
diff --git a/windows/sysparams.c b/windows/sysparams.c
index aeebdb1..c36fa43 100644
--- a/windows/sysparams.c
+++ b/windows/sysparams.c
@@ -15,10 +15,10 @@
 #include "wine/winuser16.h"
 #include "winerror.h"
 
+#include "controls.h"
 #include "keyboard.h"
 #include "tweak.h"
 #include "user.h"
-#include "desktop.h"
 #include "debugtools.h"
 
 DEFAULT_DEBUG_CHANNEL(system);
diff --git a/windows/user.c b/windows/user.c
index 43f7f57..137d65f 100644
--- a/windows/user.c
+++ b/windows/user.c
@@ -16,7 +16,7 @@
 #include "queue.h"
 #include "win.h"
 #include "clipboard.h"
-#include "menu.h"
+#include "controls.h"
 #include "cursoricon.h"
 #include "hook.h"
 #include "toolhelp.h"
diff --git a/windows/win.c b/windows/win.c
index 5323615..c684504 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -15,16 +15,15 @@
 #include "heap.h"
 #include "user.h"
 #include "dce.h"
+#include "controls.h"
 #include "cursoricon.h"
 #include "hook.h"
-#include "menu.h"
 #include "message.h"
 #include "queue.h"
 #include "winpos.h"
 #include "task.h"
 #include "thread.h"
 #include "winerror.h"
-#include "mdi.h"
 #include "stackframe.h"
 #include "debugtools.h"
 
@@ -585,9 +584,8 @@
     TRACE("Creating desktop window\n");
 
 
-    if (!ICONTITLE_Init() ||
-	!WINPOS_CreateInternalPosAtom() ||
-        !(class = CLASS_AddWindow( DESKTOP_CLASS_ATOM, 0, WIN_PROC_32A,
+    if (!WINPOS_CreateInternalPosAtom() ||
+        !(class = CLASS_AddWindow( (ATOM)LOWORD(DESKTOP_CLASS_ATOM), 0, WIN_PROC_32W,
                                    &wndExtra, &winproc, &clsStyle, &dce )))
         return FALSE;
 
@@ -632,11 +630,9 @@
     pWndDesktop->cbWndExtra        = wndExtra;
     pWndDesktop->irefCount         = 0;
 
-    /* FIXME: How do we know if it should be Unicode or not */
-    if(!pWndDesktop->pDriver->pCreateDesktopWindow(pWndDesktop, FALSE))
-      return FALSE;
-    
-    SendMessageA( hwndDesktop, WM_NCCREATE, 0, 0 );
+    if(!pWndDesktop->pDriver->pCreateDesktopWindow(pWndDesktop)) return FALSE;
+
+    SendMessageW( hwndDesktop, WM_NCCREATE, 0, 0 );
     pWndDesktop->flags |= WIN_NEEDS_ERASEBKGND;
     return TRUE;
 }
diff --git a/windows/winpos.c b/windows/winpos.c
index c080c32..3fa9a35 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -11,6 +11,7 @@
 #include "wingdi.h"
 #include "winerror.h"
 #include "wine/winuser16.h"
+#include "controls.h"
 #include "heap.h"
 #include "user.h"
 #include "region.h"
diff --git a/windows/winproc.c b/windows/winproc.c
index e374315..bd57cf7 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -15,6 +15,7 @@
 #include "wine/winuser16.h"
 #include "stackframe.h"
 #include "builtin16.h"
+#include "controls.h"
 #include "heap.h"
 #include "selectors.h"
 #include "struct32.h"
@@ -25,7 +26,6 @@
 #include "commctrl.h"
 #include "task.h"
 #include "thread.h"
-#include "menu.h"
 
 DECLARE_DEBUG_CHANNEL(msg);
 DECLARE_DEBUG_CHANNEL(relay);
diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c
index fc6379f..519ab37 100644
--- a/windows/x11drv/event.c
+++ b/windows/x11drv/event.c
@@ -28,7 +28,6 @@
 #include "clipboard.h"
 #include "dce.h"
 #include "debugtools.h"
-#include "drive.h"
 #include "heap.h"
 #include "input.h"
 #include "keyboard.h"
@@ -1576,9 +1575,6 @@
 	    {
 	      p_drop = p;
 	      if((u.i = *p) != -1 ) 
-		u.i = DRIVE_FindDriveRoot( (const char **)&p_drop );
-	      if( u.i == -1 ) *p = -1;	/* mark as "bad" */
-	      else
 		{
 		  INT len = GetShortPathNameA( p, NULL, 0 );
 		  if (len) aux_long += len + 1;
diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c
index e8ef341..56e8164 100644
--- a/windows/x11drv/wnd.c
+++ b/windows/x11drv/wnd.c
@@ -173,7 +173,7 @@
 /**********************************************************************
  *		X11DRV_WND_CreateDesktopWindow
  */
-BOOL X11DRV_WND_CreateDesktopWindow(WND *wndPtr, BOOL bUnicode)
+BOOL X11DRV_WND_CreateDesktopWindow(WND *wndPtr)
 {
     if (wmProtocols == None)
         wmProtocols = TSXInternAtom( display, "WM_PROTOCOLS", True );