Index: trunk/src/user32/new/dialog.cpp
===================================================================
--- trunk/src/user32/new/dialog.cpp	(revision 643)
+++ trunk/src/user32/new/dialog.cpp	(revision 644)
@@ -14,9 +14,6 @@
 #include <heapstring.h>
 #include <winuser.h>
-//#include "windowsx.h"
-//#include "wine/winuser16.h"
-//#include "wine/winbase16.h"
+#include <direct.h>
 #include "dialog.h"
-//#include "drive.h"
 #include "heap.h"
 #include "win.h"
@@ -24,8 +21,28 @@
 #include "user.h"
 #include "winproc.h"
-//#include "message.h"
-//#include "debugtools.h"
 
 //ODINDEBUGCHANNEL(USER32-DIALOG)
+
+
+#define     SelectFont(hdc, hfont)  ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT) (hfont)))
+
+int DRIVE_GetCurrentDrive(void)        {return(_getdrive());}
+int DRIVE_SetCurrentDrive( int drive ) {return(_chdrive(drive));}
+
+const char * DRIVE_GetDosCwd( int drive )
+{
+  static char szBuf[256];
+  return (_getcwd(szBuf,drive));
+}
+
+int DRIVE_Chdir( int drive, const char *path )
+{
+  _chdrive(drive);
+  return(_chdir((char*)path));
+}
+
+
+
+
 
 
@@ -79,4 +96,9 @@
 
 
+
+
+
+
+
 /***********************************************************************
  *           DIALOG_GetCharSizeFromDC
@@ -159,10 +181,10 @@
 BOOL DIALOG_Init(void)
 {
-    HDC16 hdc;
+    HDC  hdc;
     SIZE size;
 
       /* Calculate the dialog base units */
 
-    if (!(hdc = CreateDC16( "DISPLAY", NULL, NULL, NULL ))) return FALSE;
+    if (!(hdc = O32_CreateDC( "DISPLAY", NULL, NULL, NULL ))) return FALSE;
     if (!DIALOG_GetCharSizeFromDC( hdc, 0, &size )) return FALSE;
     DeleteDC( hdc );
@@ -348,5 +370,5 @@
 static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR strTemplate,
                                      const DLG_TEMPLATE *dlgTemplate,
-                                     HINSTANCE hInst, BOOL win32 )
+                                     HINSTANCE hInst)
 {
     DIALOGINFO *dlgInfo = (DIALOGINFO *)pWnd->wExtra;
@@ -505,8 +527,10 @@
  *           DIALOG_CreateIndirect
  */
-HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
-                              BOOL win32Template, HWND owner,
-                              DLGPROC16 dlgProc, LPARAM param,
-                              WINDOWPROCTYPE procType )
+HWND DIALOG_CreateIndirect( HINSTANCE hInst,
+                            LPCSTR dlgTemplate,
+                            HWND owner,
+                            DLGPROC16 dlgProc,
+                            LPARAM param,
+                            WINDOWPROCTYPE procType )
 {
     HMENU16 hMenu = 0;
@@ -537,21 +561,8 @@
           /* (see CreateFont() documentation in the Windows SDK).   */
 
-   if (win32Template)
        hFont = CreateFontW( -strTemplate.pointSize, 0, 0, 0,
                                    strTemplate.weight, strTemplate.italic, FALSE,
                                    FALSE, DEFAULT_CHARSET, 0, 0, PROOF_QUALITY,
                                    FF_DONTCARE, (LPCWSTR)strTemplate.faceName );
-   else
-       hFont = CreateFont16( -strTemplate.pointSize, 0, 0, 0, FW_DONTCARE,
-              FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
-              PROOF_QUALITY, FF_DONTCARE,
-              strTemplate.faceName );
-        if (hFont)
-        {
-            SIZE charSize;
-            DIALOG_GetCharSize(hFont,&charSize);
-            xUnit = charSize.cx;
-            yUnit = charSize.cy;
-        }
     }
 
@@ -570,5 +581,5 @@
     if ((INT16)strTemplate.x == CW_USEDEFAULT16)
     {
-        rect.left = rect.top = win32Template? CW_USEDEFAULT : CW_USEDEFAULT16;
+        rect.left = rect.top = CW_USEDEFAULT;
     }
     else
@@ -637,5 +648,5 @@
 
     if (DIALOG_CreateControls( wndPtr, dlgTemplate, &strTemplate,
-                               hInst, win32Template ))
+                               hInst))
     {
        /* Send initialisation messages and set focus */
@@ -693,35 +704,37 @@
  *           CreateDialogIndirectParam32A   (USER32.69)
  */
+
 HWND WINAPI CreateDialogIndirectParamA( HINSTANCE hInst,
-                                            LPCVOID dlgTemplate,
+                                        DLGTEMPLATE* dlgTemplate,
+                                        HWND owner,
+                                        DLGPROC dlgProc,
+                                        LPARAM param )
+{
+    return DIALOG_CreateIndirect( hInst, (LPCSTR)dlgTemplate, owner,
+                                  (DLGPROC16)dlgProc, param, WIN_PROC_32A );
+}
+
+/***********************************************************************
+ *           CreateDialogIndirectParam32AorW   (USER32.71)
+ */
+HWND WINAPI CreateDialogIndirectParamAorW( HINSTANCE hInst,
+                                            DLGTEMPLATE* dlgTemplate,
                                             HWND owner, DLGPROC dlgProc,
                                             LPARAM param )
 {
-    return DIALOG_CreateIndirect( hInst, (LPCSTR)dlgTemplate, TRUE, owner,
-                                  (DLGPROC16)dlgProc, param, WIN_PROC_32A );
-}
-
-/***********************************************************************
- *           CreateDialogIndirectParam32AorW   (USER32.71)
- */
-HWND WINAPI CreateDialogIndirectParamAorW( HINSTANCE hInst,
-                                            LPCVOID dlgTemplate,
+    dprintf(("USER32- FIXME-assume WIN_PROC_32W\n"));
+    return DIALOG_CreateIndirect( hInst, (LPCSTR)dlgTemplate, owner,
+                                  (DLGPROC16)dlgProc, param, WIN_PROC_32W );
+}
+
+/***********************************************************************
+ *           CreateDialogIndirectParam32W   (USER32.72)
+ */
+HWND WINAPI CreateDialogIndirectParamW( HINSTANCE hInst,
+                                            DLGTEMPLATE* dlgTemplate,
                                             HWND owner, DLGPROC dlgProc,
                                             LPARAM param )
 {
-    dprintf(("USER32- FIXME-assume WIN_PROC_32W\n"));
-    return DIALOG_CreateIndirect( hInst, (LPCSTR)dlgTemplate, TRUE, owner,
-                                  (DLGPROC16)dlgProc, param, WIN_PROC_32W );
-}
-
-/***********************************************************************
- *           CreateDialogIndirectParam32W   (USER32.72)
- */
-HWND WINAPI CreateDialogIndirectParamW( HINSTANCE hInst,
-                                            LPCVOID dlgTemplate,
-                                            HWND owner, DLGPROC dlgProc,
-                                            LPARAM param )
-{
-    return DIALOG_CreateIndirect( hInst, (LPCSTR)dlgTemplate, TRUE, owner,
+    return DIALOG_CreateIndirect( hInst, (LPCSTR)dlgTemplate, owner,
                                   (DLGPROC16)dlgProc, param, WIN_PROC_32W );
 }
@@ -747,6 +760,8 @@
         EnableWindow( owner, FALSE );
         ShowWindow( hwnd, SW_SHOW );
-        while (MSG_InternalGetMessage(&msg, hwnd, owner, MSGF_DIALOGBOX,
-                                      PM_REMOVE, !(wndPtr->dwStyle & DS_NOIDLEMSG), NULL ))
+
+//        while (MSG_InternalGetMessage(&msg, hwnd, owner, MSGF_DIALOGBOX,
+//                                      PM_REMOVE, !(wndPtr->dwStyle & DS_NOIDLEMSG), NULL ))
+        while (GetMessageA(&msg, hwnd, owner, MSGF_DIALOGBOX))
         {
             if (!IsDialogMessageA( hwnd, &msg))
@@ -793,7 +808,9 @@
  *           DialogBoxIndirectParam32A   (USER32.136)
  */
-INT WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance, LPCVOID strTemplate,
-                                       HWND owner, DLGPROC dlgProc,
-                                       LPARAM param )
+INT WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance,
+                                   DLGTEMPLATE* strTemplate,
+                                   HWND owner,
+                                   DLGPROC dlgProc,
+                                   LPARAM param )
 {
     HWND hwnd = CreateDialogIndirectParamA( hInstance, strTemplate,
@@ -807,7 +824,9 @@
  *           DialogBoxIndirectParam32W   (USER32.138)
  */
-INT WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance, LPCVOID strTemplate,
-                                       HWND owner, DLGPROC dlgProc,
-                                       LPARAM param )
+INT WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance,
+                                   DLGTEMPLATE* strTemplate,
+                                   HWND owner,
+                                   DLGPROC dlgProc,
+                                   LPARAM param )
 {
     HWND hwnd = CreateDialogIndirectParamW( hInstance, strTemplate,
@@ -1269,7 +1288,7 @@
  *           IsDlgButtonChecked32   (USER32.344)
  */
-UINT WINAPI IsDlgButtonChecked( HWND hwnd, UINT id )
-{
-    return (UINT)SendDlgItemMessageA( hwnd, id, BM_GETCHECK, 0, 0 );
+BOOL WINAPI IsDlgButtonChecked( HWND hwnd, UINT id )
+{
+    return (BOOL)SendDlgItemMessageA( hwnd, id, BM_GETCHECK, 0, 0 );
 }
 
Index: trunk/src/user32/new/makefile
===================================================================
--- trunk/src/user32/new/makefile	(revision 643)
+++ trunk/src/user32/new/makefile	(revision 644)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.29 1999-08-21 19:10:59 sandervl Exp $
+# $Id: makefile,v 1.30 1999-08-23 10:49:23 phaller Exp $
 
 #
@@ -27,9 +27,9 @@
         uitools.obj unknown.obj spy.obj wndmsg.obj \
         pmwindow.obj win32class.obj win32wnd.obj win32dlg.obj \
-        msgbox.obj window.obj windowmsg.obj windowclass.obj windlgmsg.obj \
+        msgbox.obj window.obj windowmsg.obj windowclass.obj \
         windowword.obj gen_object.obj oslibwin.obj win32wndchild.obj \
         controls.obj button.obj static.obj scroll.obj listbox.obj \
         combo.obj edit.obj clipboard.obj winicon.obj \
-        oslibutil.obj oslibmsg.obj windlg.obj dib.obj \
+        oslibutil.obj oslibmsg.obj dib.obj \
         winprop.obj wingdi.obj oslibgdi.obj winaccel.obj winscrollbar.obj \
         nativerc.obj oslibres.obj
@@ -87,8 +87,6 @@
 window.obj:    window.cpp win32class.h win32wnd.h win32wndchild.h oslibwin.h
 windowmsg.obj: windowmsg.cpp win32class.h win32wnd.h win32wndchild.h
-windlg.obj:    windlg.cpp win32wnd.h win32dlg.h
 winprop.obj:   winprop.cpp
 wingdi.obj:    wingdi.cpp win32wnd.h oslibgdi.h
-windlgmsg.obj: windlgmsg.cpp win32class.h win32wnd.h win32dlg.h win32wndchild.h
 windowclass.obj: windowclass.cpp win32class.h win32wnd.h win32wndchild.h
 windowword.obj:  windowword.cpp win32class.h win32wnd.h win32dlg.h win32wndchild.h
