Commit in reactos/lib/comdlg32 on MAIN
cdlg_Pl.rc+31-311.3 -> 1.4
colordlg16.c+1-11.2 -> 1.3
filedlg.c+5-31.10 -> 1.11
filedlg16.c+4-41.5 -> 1.6
filedlgbrowser.c+21.3 -> 1.4
finddlg.c+2-21.2 -> 1.3
fontdlg.c+25-241.4 -> 1.5
fontdlg16.c+1-11.3 -> 1.4
printdlg.c+86-691.7 -> 1.8
printdlg16.c+1-11.2 -> 1.3
winehq2ros.patch+36-361.6 -> 1.7
+194-172
11 modified files
Jacek Caban <jack@itma.pwr.wroc.pl>
- Added/updated Polish translations.
Robert Shearman <rob@codeweavers.com>
- GetWindowLong -> GetWindowLongPtr.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Fix various function prototypes.
- Better document some apis in commdlg and mscms.
Francois Gouget <fgouget@free.fr>
- Don't define COBJMACROS in objbase.h.
- Update the Wine sources accordingly.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Constify some statics and make them smaller.
Steven Edwards <steven_ed4153@yahoo.com>
- Remove unneeded include statements.
Dimitrie O. Paun <dpaun@rogers.com>
- Avoid W->A transitions.

reactos/lib/comdlg32
cdlg_Pl.rc 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- cdlg_Pl.rc	19 Sep 2004 10:03:26 -0000	1.3
+++ cdlg_Pl.rc	20 Oct 2004 08:53:06 -0000	1.4
@@ -24,7 +24,7 @@
 
 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
 
-OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
+OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 285, 134
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Otw�rz"
 FONT 8, "MS Shell Dlg"
@@ -39,14 +39,14 @@
  COMBOBOX cmb1, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
  LTEXT "&Dyski:", 1091, 110, 104, 92, 9
  COMBOBOX cmb2, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
- DEFPUSHBUTTON "Otw�rz", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
- PUSHBUTTON "Anuluj", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON "&Pomoc", pshHelp, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
- CHECKBOX "Tylko do &odczytu", chx1, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ DEFPUSHBUTTON "Otw�rz", 1, 208, 6, 66, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Anuluj", 2, 208, 24, 66, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "&Pomoc", pshHelp, 208, 46, 66, 14, WS_GROUP | WS_TABSTOP
+ CHECKBOX "Tylko do &odczytu", chx1, 208, 68, 66, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
 }
 
 
-SAVE_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
+SAVE_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 285, 134
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Zapisz jako..."
 FONT 8, "MS Shell Dlg"
@@ -61,10 +61,10 @@
  COMBOBOX cmb1, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
  LTEXT "&Dyski:", 1091, 110, 104, 92, 9
  COMBOBOX cmb2, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
- DEFPUSHBUTTON "Zapisz jako", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
- PUSHBUTTON "Anuluj", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON "&Pomoc", pshHelp, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
- CHECKBOX "Tylko do &odczytu", chx1, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ DEFPUSHBUTTON "Zapisz jako", 1, 208, 6, 66, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Anuluj", 2, 208, 24, 66, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "&Pomoc", pshHelp, 208, 46, 66, 14, WS_GROUP | WS_TABSTOP
+ CHECKBOX "Tylko do &odczytu", chx1, 208, 68, 66, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
 }
 
 
@@ -125,7 +125,7 @@
     LTEXT           "&Czcionka:",stc1 ,6,3,40,9
     COMBOBOX        cmb1, 6,13,94,54,  CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
                     CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
-    LTEXT           "St&yl:",stc2 ,108,3,44,9
+    LTEXT           "&Styl:",stc2 ,108,3,44,9
     COMBOBOX        cmb2,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
                     WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
     LTEXT           "&Rozmiar:",stc3,179,3,30,9
@@ -136,8 +136,8 @@
     PUSHBUTTON      "&Zastosuj", psh3,218,40,40,14,WS_GROUP | WS_TABSTOP
     PUSHBUTTON      "&Pomoc" , pshHelp,218,57,40,14,WS_GROUP | WS_TABSTOP
     GROUPBOX        "Efekty specialne",grp1,6,72,84,34,WS_GROUP
-    CHECKBOX	    "Prz&ekre�lona", chx1, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP
-    CHECKBOX 	    "P&odkre�lona", chx2, 10,94,50,10, BS_AUTOCHECKBOX
+    CHECKBOX	    "Prz&ekre�lona", chx1, 10,82,65,10, BS_AUTOCHECKBOX | WS_TABSTOP
+    CHECKBOX 	    "P&odkre�lona", chx2, 10,94,65,10, BS_AUTOCHECKBOX
     LTEXT           "&Kolor:", stc4 ,6,110,30,9
     COMBOBOX        cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
 		    CBS_AUTOHSCROLL |  WS_BORDER | WS_VSCROLL | WS_TABSTOP
@@ -183,26 +183,26 @@
 }
 
 
-FINDDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 246, 62
+FINDDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 62
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Znajd�"
 FONT 8, "MS Shell Dlg"
 {
  LTEXT "&Znajd�:", -1, 4, 8, 42, 8
- EDITTEXT edt1, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
- CHECKBOX "Uwzgl�dniaj tylko ca�e wyrazy", chx1, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
- CHECKBOX "&Uwzgl�dniaj wielko�� liter", chx2, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP
- GROUPBOX "Kierunek", grp1, 107, 26, 68, 28
- CONTROL "W &g�r�", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12
- CONTROL "W &d��", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12
+ EDITTEXT edt1, 35, 7, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
+ CHECKBOX "Uwzgl�dniaj tylko ca�e wyrazy", chx1, 4, 26, 120, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "&Uwzgl�dniaj wielko�� liter", chx2, 4, 42, 120, 12, BS_AUTOCHECKBOX | WS_TABSTOP
+ GROUPBOX "Kierunek", grp1, 127, 26, 68, 28
+ CONTROL "W &g�r�", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 131, 38, 20, 12
+ CONTROL "W &d��", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 158, 38, 30, 12
 
- DEFPUSHBUTTON "&Znajd� nast�pny", IDOK, 182,  5, 60, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
- PUSHBUTTON "Anuluj", IDCANCEL	 , 182, 23, 60, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON "&Pomoc", pshHelp	 , 182, 45, 60, 14, WS_GROUP | WS_TABSTOP
+ DEFPUSHBUTTON "&Znajd� nast�pny", IDOK, 202,  5, 69, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
+ PUSHBUTTON "Anuluj", IDCANCEL	 , 202, 23, 69, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "&Pomoc", pshHelp	 , 202, 45, 69, 14, WS_GROUP | WS_TABSTOP
 }
 
 
-REPLACEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 240, 94
+REPLACEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 94
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Zamie�"
 FONT 8, "MS Shell Dlg"
@@ -211,14 +211,14 @@
  EDITTEXT edt1, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
  LTEXT "Zanie� &na:", -1, 4, 26, 48, 8
  EDITTEXT edt2, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
- CHECKBOX "Uwzgl�dniaj &tylko ca�e wyrazy", chx1, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
- CHECKBOX "&Uwzgl�dniaj wielko�� liter", chx2, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP
+ CHECKBOX "Uwzgl�dniaj &tylko ca�e wyrazy", chx1, 5, 46, 120, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ CHECKBOX "&Uwzgl�dniaj wielko�� liter", chx2, 5, 62, 120, 12, BS_AUTOCHECKBOX | WS_TABSTOP
 
- DEFPUSHBUTTON "Znajd� nast�pny", IDOK, 174,  4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
- PUSHBUTTON "&Zamie�", psh1	 , 174, 21, 60, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON "Zamie� &wszystkie", psh2 , 174, 38, 60, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON "Anuluj", IDCANCEL	 , 174, 55, 60, 14, WS_GROUP | WS_TABSTOP
- PUSHBUTTON "&Pomoc", pshHelp	 , 174, 75, 60, 14, WS_GROUP | WS_TABSTOP
+ DEFPUSHBUTTON "Znajd� nast�pny", IDOK, 174,  4, 70, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
+ PUSHBUTTON "&Zamie�", psh1	 , 174, 21, 70, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Zamie� &wszystkie", psh2 , 174, 38, 70, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Anuluj", IDCANCEL	 , 174, 55, 70, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "&Pomoc", pshHelp	 , 174, 75, 70, 14, WS_GROUP | WS_TABSTOP
 }
 
 

reactos/lib/comdlg32
colordlg16.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- colordlg16.c	11 Mar 2004 21:15:50 -0000	1.2
+++ colordlg16.c	20 Oct 2004 08:53:06 -0000	1.3
@@ -463,7 +463,7 @@
     }
 
     ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 8);
-    hInst = GetWindowLongA(HWND_32(lpChCol->hwndOwner), GWL_HINSTANCE);
+    hInst = GetWindowLongPtrA(HWND_32(lpChCol->hwndOwner), GWLP_HINSTANCE);
     bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChCol->hwndOwner,
                      (DLGPROC16) ptr, (DWORD)lpChCol);
     if (hResource16) FreeResource16(hDlgTmpl16);

reactos/lib/comdlg32
filedlg.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- filedlg.c	19 Sep 2004 10:03:26 -0000	1.10
+++ filedlg.c	20 Oct 2004 08:53:06 -0000	1.11
@@ -55,8 +55,10 @@
 #include <stdio.h>
 #include <string.h>
 
+#define COBJMACROS
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
+
 #include "windef.h"
 #include "winbase.h"
 #include "winreg.h"
@@ -2118,7 +2120,7 @@
  *
  * Initialisation of the shell objects
  */
-static HRESULT FILEDLG95_SHELL_Init(HWND hwnd)
+static LRESULT FILEDLG95_SHELL_Init(HWND hwnd)
 {
   FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
 
@@ -3635,7 +3637,7 @@
     lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE);
     if (lfs)
     {
-        hInst = (HINSTANCE)GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
+        hInst = (HINSTANCE)GetWindowLongPtrA( lpofn->hwndOwner, GWLP_HINSTANCE );
         bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner,
                                         FD32_FileOpenDlgProc, (LPARAM)lfs);
         FD31_DestroyPrivate(lfs);
@@ -3665,7 +3667,7 @@
     lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE);
     if (lfs)
     {
-        hInst = (HINSTANCE)GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
+        hInst = (HINSTANCE)GetWindowLongPtrW( lpofn->hwndOwner, GWLP_HINSTANCE );
         bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner,
                                         FD32_FileOpenDlgProc, (LPARAM)lfs);
         FD31_DestroyPrivate(lfs);

reactos/lib/comdlg32
filedlg16.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- filedlg16.c	14 Jul 2004 06:52:29 -0000	1.5
+++ filedlg16.c	20 Oct 2004 08:53:06 -0000	1.6
@@ -329,7 +329,7 @@
 /* ------------------ Dialog procedures ---------------------- */
 
 /***********************************************************************
- *           FileOpenDlgProc16   (COMMDLG.6)
+ *           FileOpenDlgProc   (COMMDLG.6)
  */
 BOOL16 CALLBACK FileOpenDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam)
 {
@@ -377,7 +377,7 @@
 }
 
 /***********************************************************************
- *           FileSaveDlgProc16   (COMMDLG.7)
+ *           FileSaveDlgProc   (COMMDLG.7)
  */
 BOOL16 CALLBACK FileSaveDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam)
 {
@@ -459,7 +459,7 @@
     if (lfs)
     {
         priv = (PFD16_PRIVATE) lfs->private1632;
-        hInst = GetWindowWord( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
+        hInst = GetWindowLongPtrA( HWND_32(lpofn->hwndOwner), GWLP_HINSTANCE );
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
         bRet = DialogBoxIndirectParam16( hInst, priv->hDlgTmpl16, lpofn->hwndOwner,
                                          (DLGPROC16) ptr, (LPARAM) lfs);
@@ -501,7 +501,7 @@
     if (lfs)
     {
         priv = (PFD16_PRIVATE) lfs->private1632;
-        hInst = GetWindowWord( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
+        hInst = GetWindowLongPtrA( HWND_32(lpofn->hwndOwner), GWLP_HINSTANCE );
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
         bRet = DialogBoxIndirectParam16( hInst, priv->hDlgTmpl16, lpofn->hwndOwner,
                                          (DLGPROC16) ptr, (LPARAM) lfs);

reactos/lib/comdlg32
filedlgbrowser.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- filedlgbrowser.c	19 Sep 2004 10:03:26 -0000	1.3
+++ filedlgbrowser.c	20 Oct 2004 08:53:06 -0000	1.4
@@ -23,8 +23,10 @@
 #include <stdio.h>
 #include <string.h>
 
+#define COBJMACROS
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
+
 #include "windef.h"
 #include "winbase.h"
 #include "winnls.h"

reactos/lib/comdlg32
finddlg.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- finddlg.c	11 Mar 2004 21:15:50 -0000	1.2
+++ finddlg.c	20 Oct 2004 08:53:06 -0000	1.3
@@ -182,7 +182,7 @@
     lfr->find = TRUE;
     if (FINDDLG_Get16BitsTemplate(lfr))
     {
-        hInst = GetWindowLongA( HWND_32(lfr->fr16->hwndOwner), GWL_HINSTANCE);
+        hInst = GetWindowLongPtrA( HWND_32(lfr->fr16->hwndOwner), GWLP_HINSTANCE);
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 13);
         ret = CreateDialogIndirectParam16( hInst, lfr->template,
                     lfr->fr16->hwndOwner, (DLGPROC16) ptr, find);
@@ -212,7 +212,7 @@
     lfr->find = FALSE;
     if (FINDDLG_Get16BitsTemplate(lfr))
     {
-        hInst = GetWindowLongA( HWND_32(lfr->fr16->hwndOwner), GWL_HINSTANCE);
+        hInst = GetWindowLongPtrA( HWND_32(lfr->fr16->hwndOwner), GWLP_HINSTANCE);
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 14);
         ret = CreateDialogIndirectParam16( hInst, lfr->template,
                     lfr->fr16->hwndOwner, (DLGPROC16) ptr, find);

reactos/lib/comdlg32
fontdlg.c 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- fontdlg.c	14 Aug 2004 19:21:01 -0000	1.4
+++ fontdlg.c	20 Oct 2004 08:53:06 -0000	1.5
@@ -29,9 +29,6 @@
 #include "winnls.h"
 #include "wingdi.h"
 #include "winuser.h"
-#include "wine/winbase16.h"
-#include "wine/winuser16.h"
-#include "heap.h"
 #include "commdlg.h"
 #include "dlgs.h"
 #include "wine/debug.h"
@@ -99,7 +96,7 @@
     stKOI8,stIso88593,stIso88594,stIso885910,stCeltic};
 
 
-static const int CHARSET_ORDER[256]={
+static const BYTE CHARSET_ORDER[256]={
     CI(ANSI), 0, CI(SYMBOL), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -118,9 +115,9 @@
     CI(VISCII), CI(TCVN), CI(KOI8), CI(ISO3), CI(ISO4), CI(ISO10), CI(CELTIC), 0, 0, 0, 0, 0, 0, 0, 0, CI(OEM),
 };
 
-struct {
-    int         mask;
-    char        *name;
+static const struct {
+    DWORD       mask;
+    const char *name;
 } cfflags[] = {
 #define XX(x) { x, #x },
     XX(CF_SCREENFONTS)
@@ -149,17 +146,16 @@
     XX(CF_NOSCRIPTSEL)
     XX(CF_NOVERTFONTS)
 #undef XX
-    {0,NULL},
 };
 
 void _dump_cf_flags(DWORD cflags)
 {
     int i;
 
-    for (i=0;cfflags[i].name;i++)
+    for (i = 0; i < sizeof(cfflags)/sizeof(cfflags[0]); i++)
         if (cfflags[i].mask & cflags)
-            MESSAGE("%s|",cfflags[i].name);
-    MESSAGE("\n");
+            TRACE("%s|",cfflags[i].name);
+    TRACE("\n");
 }
 
 /***********************************************************************
@@ -171,7 +167,7 @@
     HRSRC hResInfo;
     HINSTANCE hDlginst;
     HGLOBAL hDlgTmpl;
-    
+
     static const WCHAR chooseFontW[] = {'C','H','O','O','S','E','_',
                                         'F','O','N','T',0};
 
@@ -350,9 +346,9 @@
     {
         int italic;
         int weight;
-        char stname[20];
+        const char *stname;
     };
-    static struct FONTSTYLE fontstyles[FSTYLES]={
+    static const struct FONTSTYLE fontstyles[FSTYLES]={
         { 0,FW_NORMAL,"Regular"}, { 1,FW_NORMAL,"Italic"},
         { 0,FW_BOLD,"Bold"}, { 1,FW_BOLD,"Bold Italic"}
     };
@@ -414,10 +410,10 @@
  */
 static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTA lpcf)
 {
-    static const int sizes[]={8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72,0};
+    static const char sizes[]={8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
     int i;
 
-    for (i=0; sizes[i]; i++)
+    for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++)
         if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return 1;
     return 0;
 }
@@ -485,7 +481,7 @@
     if( iswin16 || !( hcmb5 = GetDlgItem(hDlg, cmb5))) return 1;
     i = SendMessageA( hcmb5, CB_FINDSTRINGEXACT, 0,
                 (LPARAM)lpElfex->elfScript);
-    if( i == CB_ERR) { 
+    if( i == CB_ERR) {
         i = SendMessageA( hcmb5, CB_ADDSTRING, 0,
                 (LPARAM)lpElfex->elfScript);
         if( i != CB_ERR)
@@ -617,7 +613,7 @@
                 strcpy( name, "[color name]" );
             }
             j=SendDlgItemMessageA(hDlg, cmb4, CB_ADDSTRING, 0, (LPARAM)name);
-            SendDlgItemMessageA(hDlg, cmb4, CB_SETITEMDATA16, j, textcolors[j]);
+            SendDlgItemMessageA(hDlg, cmb4, CB_SETITEMDATA, j, textcolors[j]);
             /* look for a fitting value in color combobox */
             if (textcolors[j]==lpcf->rgbColors)
                 SendDlgItemMessageA(hDlg,cmb4, CB_SETCURSEL,j,0);
@@ -873,7 +869,7 @@
             pstyle = SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, idx, 0);
             idx = SendDlgItemMessageA(hDlg, cmb5, CB_GETCURSEL, 0, 0);
             charset = SendDlgItemMessageA(hDlg, cmb5, CB_GETITEMDATA, idx, 0);
-            
+
             SendDlgItemMessageA(hDlg, cmb2, CB_RESETCONTENT, 0, 0);
             SendDlgItemMessageA(hDlg, cmb3, CB_RESETCONTENT, 0, 0);
             SendDlgItemMessageA(hDlg, cmb5, CB_RESETCONTENT, 0, 0);
@@ -936,7 +932,7 @@
                     lpcf->nFontType |= BOLD_FONTTYPE;
             }
             i=SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
-            if( i != CB_ERR) 
+            if( i != CB_ERR)
                 lpcf->iPointSize = 10 * LOWORD(SendDlgItemMessageA(hDlg, cmb3,
                             CB_GETITEMDATA , i, 0));
             else
@@ -947,7 +943,7 @@
                 lpxx->lfHeight = - MulDiv( lpcf->iPointSize ,
                         GetDeviceCaps(hdc, LOGPIXELSY), 720);
                 CFn_ReleaseDC(lpcf, hdc);
-            } else 
+            } else
                 lpxx->lfHeight = -lpcf->iPointSize / 10;
             i=SendDlgItemMessageA(hDlg, cmb5, CB_GETCURSEL, 0, 0);
             if (i!=CB_ERR)
@@ -1039,7 +1035,11 @@
         LOGFONTA lf = *(lpcf->lpLogFont);
 
         MapWindowPoints( 0, hDlg, (LPPOINT) &info.rcWindow, 2);
-        hdc=BeginPaint( hDlg, &ps );
+        hdc = BeginPaint( hDlg, &ps );
+
+        TRACE("erase %d, rect=(%ld,%ld)-(%ld,%ld)\n", ps.fErase,
+              ps.rcPaint.left, ps.rcPaint.top,
+              ps.rcPaint.right, ps.rcPaint.bottom);
 
         /* Paint frame */
         MoveToEx( hdc, info.rcWindow.left, info.rcWindow.bottom, NULL );
@@ -1060,7 +1060,7 @@
         info.rcWindow.left++;
         hOrigFont = SelectObject( hdc, CreateFontIndirectA( &lf ) );
         rgbPrev=SetTextColor( hdc, lpcf->rgbColors );
-        
+
         DrawTextW( hdc,
                 sample_lang_text[CHARSET_ORDER[lpcf->lpLogFont->lfCharSet]],
                 -1, &info.rcWindow, DT_CENTER|DT_VCENTER|DT_SINGLELINE );
@@ -1068,7 +1068,6 @@
         DeleteObject(SelectObject( hdc, hOrigFont ));
         EndPaint( hDlg, &ps );
     }
-
     return FALSE;
 }
 
@@ -1080,6 +1079,7 @@
 {
     LPCHOOSEFONTA lpcf;
     INT_PTR res = FALSE;
+
     if (uMsg!=WM_INITDIALOG)
     {
         lpcf=(LPCHOOSEFONTA)GetPropA(hDlg, WINE_FONTDATA);
@@ -1130,6 +1130,7 @@
 {
     LPCHOOSEFONTW lpcf32w;
     INT_PTR res = FALSE;
+
     if (uMsg!=WM_INITDIALOG)
     {
         lpcf32w=(LPCHOOSEFONTW)GetPropA(hDlg, WINE_FONTDATA);

reactos/lib/comdlg32
fontdlg16.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- fontdlg16.c	19 Sep 2004 10:03:26 -0000	1.3
+++ fontdlg16.c	20 Oct 2004 08:53:06 -0000	1.4
@@ -231,7 +231,7 @@
     lpChFont->lpTemplateName=(SEGPTR)&cf32a;
 
     ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 16);
-    hInst = GetWindowLongA(HWND_32(lpChFont->hwndOwner), GWL_HINSTANCE);
+    hInst = GetWindowLongPtrA(HWND_32(lpChFont->hwndOwner), GWLP_HINSTANCE);
     bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChFont->hwndOwner,
                      (DLGPROC16) ptr, (DWORD)lpChFont);
     if (hResource16) FreeResource16(hDlgTmpl16);

reactos/lib/comdlg32
printdlg.c 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- printdlg.c	19 Sep 2004 10:03:26 -0000	1.7
+++ printdlg.c	20 Oct 2004 08:53:06 -0000	1.8
@@ -156,17 +156,15 @@
     if(!name ||
        (i = SendDlgItemMessageW(hDlg, id, CB_FINDSTRINGEXACT, -1,
 				(LPARAM)name)) == CB_ERR) {
-
-	/* ansi is ok */
-        char buf[260];
-        DWORD dwBufLen = sizeof(buf);
-        FIXME("Can't find '%s' in printer list so trying to find default\n",
+        WCHAR buf[260];
+        DWORD dwBufLen = sizeof(buf)/sizeof(buf[0]);
+        TRACE("Can't find '%s' in printer list so trying to find default\n",
 	      debugstr_w(name));
-	if(!GetDefaultPrinterA(buf, &dwBufLen))
+	if(!GetDefaultPrinterW(buf, &dwBufLen))
 	    return num;
-	i = SendDlgItemMessageA(hDlg, id, CB_FINDSTRINGEXACT, -1, (LPARAM)buf);
+	i = SendDlgItemMessageW(hDlg, id, CB_FINDSTRINGEXACT, -1, (LPARAM)buf);
 	if(i == CB_ERR)
-	    FIXME("Can't find default printer in printer list\n");
+	    TRACE("Can't find default printer in printer list\n");
     }
     SendDlgItemMessageW(hDlg, id, CB_SETCURSEL, i, 0);
     return num;
@@ -378,14 +376,14 @@
 	    nToPage   = GetDlgItemInt(hDlg, edt2, NULL, FALSE);
 	    if (nFromPage < lppd->nMinPage || nFromPage > lppd->nMaxPage ||
 		nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) {
-	        char resourcestr[256];
-		char resultstr[256];
-		LoadStringA(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE,
+	        WCHAR resourcestr[256];
+		WCHAR resultstr[256];
+		LoadStringW(COMDLG32_hInstance, PD32_INVALID_PAGE_RANGE,
 			    resourcestr, 255);
-		sprintf(resultstr,resourcestr, lppd->nMinPage, lppd->nMaxPage);
-		LoadStringA(COMDLG32_hInstance, PD32_PRINT_TITLE,
+		wsprintfW(resultstr,resourcestr, lppd->nMinPage, lppd->nMaxPage);
+		LoadStringW(COMDLG32_hInstance, PD32_PRINT_TITLE,
 			    resourcestr, 255);
-		MessageBoxA(hDlg, resultstr, resourcestr,
+		MessageBoxW(hDlg, resultstr, resourcestr,
 			    MB_OK | MB_ICONWARNING);
 		return FALSE;
 	    }
@@ -681,13 +679,13 @@
     TRACE(" Printer: %s, Port: %s, ComboID: %d\n",debugstr_w(PrinterName),debugstr_w(PortName),nIDComboBox);
 
     /* query the dialog box for the current selected value */
-    Sel = SendDlgItemMessageA(hDlg, nIDComboBox, CB_GETCURSEL, 0, 0);
+    Sel = SendDlgItemMessageW(hDlg, nIDComboBox, CB_GETCURSEL, 0, 0);
     if(Sel != CB_ERR) {
         /* we enter here only if a different printer is selected after
          * the Print Setup dialog is opened. The current settings are
          * stored into the newly selected printer.
          */
-        oldWord = SendDlgItemMessageA(hDlg, nIDComboBox, CB_GETITEMDATA,
+        oldWord = SendDlgItemMessageW(hDlg, nIDComboBox, CB_GETITEMDATA,
                                       Sel, 0);
         if (dm) {
             if (nIDComboBox == cmb2)
@@ -745,7 +743,7 @@
 				      fwCapability_Words, (LPWSTR)Words, dm);
 
     /* reset any current content in the combobox */
-    SendDlgItemMessageA(hDlg, nIDComboBox, CB_RESETCONTENT, 0, 0);
+    SendDlgItemMessageW(hDlg, nIDComboBox, CB_RESETCONTENT, 0, 0);
 
     /* store new content */
     for (i = 0; i < NrOfEntries; i++) {
@@ -759,13 +757,13 @@
        item order will change as more items are added */
     Sel = 0;
     for (i = 0; i < NrOfEntries; i++) {
-        if(SendDlgItemMessageA(hDlg, nIDComboBox, CB_GETITEMDATA, i, 0) ==
+        if(SendDlgItemMessageW(hDlg, nIDComboBox, CB_GETITEMDATA, i, 0) ==
 	   oldWord) {
 	    Sel = i;
 	    break;
 	}
     }
-    SendDlgItemMessageA(hDlg, nIDComboBox, CB_SETCURSEL, Sel, 0);
+    SendDlgItemMessageW(hDlg, nIDComboBox, CB_SETCURSEL, Sel, 0);
 
     HeapFree(GetProcessHeap(),0,Words);
     HeapFree(GetProcessHeap(),0,Names);
@@ -1094,13 +1092,12 @@
 	}
 	/* "All xxx pages"... */
 	{
-	    /* ansi is ok */
-	    char        resourcestr[64];
-	    char        result[64];
-	    LoadStringA(COMDLG32_hInstance, PD32_PRINT_ALL_X_PAGES,
+	    WCHAR        resourcestr[64];
+	    WCHAR        result[64];
+	    LoadStringW(COMDLG32_hInstance, PD32_PRINT_ALL_X_PAGES,
 			resourcestr, 49);
-	    sprintf(result,resourcestr,lppd->nMaxPage - lppd->nMinPage + 1);
-	    SendDlgItemMessageA(hDlg, rad1, WM_SETTEXT, 0, (LPARAM) result);
+	    wsprintfW(result,resourcestr,lppd->nMaxPage - lppd->nMinPage + 1);
+	    SendDlgItemMessageW(hDlg, rad1, WM_SETTEXT, 0, (LPARAM) result);
 	}
 
 	/* Collate pages
@@ -1108,11 +1105,11 @@
 	 * FIXME: The ico3 is not displayed for some reason. I don't know why.
 	 */
 	if (lppd->Flags & PD_COLLATE) {
-	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+	    SendDlgItemMessageW(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
 				(LPARAM)PrintStructures->hCollateIcon);
 	    CheckDlgButton(hDlg, chx2, 1);
 	} else {
-	    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+	    SendDlgItemMessageW(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
 				(LPARAM)PrintStructures->hNoCollateIcon);
 	    CheckDlgButton(hDlg, chx2, 0);
 	}
@@ -1164,7 +1161,7 @@
 				  PrintStructures->lpPrinterInfo->pPortName,
 				  lpdm);
       CheckRadioButton(hDlg, rad1, rad2, bPortrait ? rad1: rad2);
-      SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+      SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                           (LPARAM)(bPortrait ? PrintStructures->hPortraitIcon :
                                    PrintStructures->hLandscapeIcon));
 
@@ -1292,6 +1289,10 @@
 static LRESULT PRINTDLG_WMInitDialogW(HWND hDlg, WPARAM wParam,
 				     PRINT_PTRW* PrintStructures)
 {
+    const static WCHAR PD32_COLLATE[] = { 'P', 'D', '3', '2', '_', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 };
+    const static WCHAR PD32_NOCOLLATE[] = { 'P', 'D', '3', '2', '_', 'N', 'O', 'C', 'O', 'L', 'L', 'A', 'T', 'E', 0 };
+    const static WCHAR PD32_PORTRAIT[] = { 'P', 'D', '3', '2', '_', 'P', 'O', 'R', 'T', 'R', 'A', 'I', 'T', 0 };
+    const static WCHAR PD32_LANDSCAPE[] = { 'P', 'D', '3', '2', '_', 'L', 'A', 'N', 'D', 'S', 'C', 'A', 'P', 'E', 0 };
     LPPRINTDLGW lppd = PrintStructures->lpPrintDlg;
     DEVNAMES *pdn;
     DEVMODEW *pdm;
@@ -1302,18 +1303,18 @@
     /* We load these with LoadImage because they are not a standard
        size and we don't want them rescaled */
     PrintStructures->hCollateIcon =
-      LoadImageA(COMDLG32_hInstance, "PD32_COLLATE", IMAGE_ICON, 0, 0, 0);
+      LoadImageW(COMDLG32_hInstance, PD32_COLLATE, IMAGE_ICON, 0, 0, 0);
     PrintStructures->hNoCollateIcon =
-      LoadImageA(COMDLG32_hInstance, "PD32_NOCOLLATE", IMAGE_ICON, 0, 0, 0);
+      LoadImageW(COMDLG32_hInstance, PD32_NOCOLLATE, IMAGE_ICON, 0, 0, 0);
 
     /* These can be done with LoadIcon */
     PrintStructures->hPortraitIcon =
-      LoadIconA(COMDLG32_hInstance, "PD32_PORTRAIT");
+      LoadIconW(COMDLG32_hInstance, PD32_PORTRAIT);
     PrintStructures->hLandscapeIcon =
-      LoadIconA(COMDLG32_hInstance, "PD32_LANDSCAPE");
+      LoadIconW(COMDLG32_hInstance, PD32_LANDSCAPE);
 
     /* display the collate/no_collate icon */
-    SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+    SendDlgItemMessageW(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                         (LPARAM)PrintStructures->hNoCollateIcon);
 
     if(PrintStructures->hCollateIcon == 0 ||
@@ -1331,7 +1332,7 @@
      */
     if (lppd->Flags & PD_SHOWHELP) {
         if((PrintStructures->HelpMessageID =
-	    RegisterWindowMessageA(HELPMSGSTRINGA)) == 0) {
+	    RegisterWindowMessageW(HELPMSGSTRINGW)) == 0) {
 	    COMDLG32_SetCommDlgExtendedError(CDERR_REGISTERMSGFAIL);
 	    return FALSE;
 	}
@@ -1608,10 +1609,10 @@
 
      case chx2:                         /* collate pages checkbox */
         if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
-            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+            SendDlgItemMessageW(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                                     (LPARAM)PrintStructures->hCollateIcon);
         else
-            SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+            SendDlgItemMessageW(hDlg, ico3, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                                     (LPARAM)PrintStructures->hNoCollateIcon);
         break;
      case edt1:                         /* from page nr editbox */
@@ -1663,7 +1664,7 @@
         if (lppd->Flags & PD_PRINTSETUP)
         {
               lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
-              SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+              SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                           (LPARAM)(PrintStructures->hPortraitIcon));
         }
         break;
@@ -1672,7 +1673,7 @@
         if (lppd->Flags & PD_PRINTSETUP)
         {
               lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
-              SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+              SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                           (LPARAM)(PrintStructures->hLandscapeIcon));
         }
         break;
@@ -1693,9 +1694,9 @@
 
     case cmb2: /* Papersize */
       {
-	  DWORD Sel = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
+	  DWORD Sel = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
 	  if(Sel != CB_ERR)
-	      lpdm->u.s.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
+	      lpdm->u.s.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
 							    CB_GETITEMDATA,
 							    Sel, 0);
       }
@@ -1703,7 +1704,7 @@
 
     case cmb3: /* Bin */
       {
-	  DWORD Sel = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
+	  DWORD Sel = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
 	  if(Sel != CB_ERR)
 	      lpdm->u.s.dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
 							  CB_GETITEMDATA, Sel,
@@ -1718,20 +1719,20 @@
 	    if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
 	        if(lpdm->u.s.dmOrientation != DMORIENT_PORTRAIT) {
 		    lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
-		    SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
+		    SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
 					(WPARAM)IMAGE_ICON,
 					(LPARAM)PrintStructures->hPortraitIcon);
-		    SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE,
+		    SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE,
 					(WPARAM)IMAGE_ICON,
 					(LPARAM)PrintStructures->hPortraitIcon);
 		}
 	    } else {
 	        if(lpdm->u.s.dmOrientation != DMORIENT_LANDSCAPE) {
 	            lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
-		    SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
+		    SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
 					(WPARAM)IMAGE_ICON,
 					(LPARAM)PrintStructures->hLandscapeIcon);
-		    SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE,
+		    SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE,
 					(WPARAM)IMAGE_ICON,
 					(LPARAM)PrintStructures->hLandscapeIcon);
 		}
@@ -1978,7 +1979,7 @@
 {
     BOOL      bRet = FALSE;
     LPVOID   ptr;
-    HINSTANCE hInst = (HINSTANCE)GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
+    HINSTANCE hInst = (HINSTANCE)GetWindowLongPtrA( lppd->hwndOwner, GWLP_HINSTANCE );
 
     if(TRACE_ON(commdlg)) {
         char flagstr[1000] = "";
@@ -2134,7 +2135,7 @@
 {
     BOOL      bRet = FALSE;
     LPVOID   ptr;
-    HINSTANCE hInst = (HINSTANCE)GetWindowLongW( lppd->hwndOwner, GWL_HINSTANCE );
+    HINSTANCE hInst = (HINSTANCE)GetWindowLongPtrW( lppd->hwndOwner, GWLP_HINSTANCE );
 
     if(TRACE_ON(commdlg)) {
         char flagstr[1000] = "";
@@ -2382,23 +2383,26 @@
     return;
 }
 static void
-_c_size2strW(PageSetupDataW *pda,DWORD size,LPSTR strout) {
-    strcpy(strout,"<undef>");
+_c_size2strW(PageSetupDataW *pda,DWORD size,LPWSTR strout) {
+    const static WCHAR UNDEF[] = { '<', 'u', 'n', 'd', 'e', 'f', '>', 0 };
+    const static WCHAR mm_fmt[] = { '%', '.', '2', 'f', 'm', 'm', 0 };
+    const static WCHAR in_fmt[] = { '%', '.', '2', 'f', 'i', 'n', 0 };
+    lstrcpyW(strout, UNDEF);
     if (pda->dlga->Flags & PSD_INHUNDREDTHSOFMILLIMETERS) {
-	sprintf(strout,"%.2fmm",(size*1.0)/100.0);
+	wsprintfW(strout,mm_fmt,(size*1.0)/100.0);
 	return;
     }
     if (pda->dlga->Flags & PSD_INTHOUSANDTHSOFINCHES) {
-	sprintf(strout,"%.2fin",(size*1.0)/1000.0);
+	wsprintfW(strout,in_fmt,(size*1.0)/1000.0);
 	return;
     }
     pda->dlga->Flags |= PSD_INHUNDREDTHSOFMILLIMETERS;
-    sprintf(strout,"%.2fmm",(size*1.0)/100.0);
+    wsprintfW(strout,mm_fmt,(size*1.0)/100.0);
     return;
 }
 
 static DWORD
-_c_str2size(PAGESETUPDLGA *dlga,LPCSTR strin) {
+_c_str2sizeA(PAGESETUPDLGA *dlga,LPCSTR strin) {
     float	val;
     char	rest[200];
 
@@ -2437,6 +2441,17 @@
 }
 
 
+static DWORD
+_c_str2sizeW(PAGESETUPDLGW *dlga, LPCWSTR strin) {
+    char	buf[200];
+
+    /* this W -> A transition is OK */
+    /* we need a unicode version of sscanf to avoid it */
+    WideCharToMultiByte(CP_ACP, 0, strin, -1, buf, sizeof(buf), NULL, NULL);
+    return _c_str2sizeA((PAGESETUPDLGA *)dlga, buf);
+}
+
+
 /*
  * This is called on finish and will update the output fields of the
  * struct.
@@ -2462,7 +2477,7 @@
 	pda->dlga->ptPaperSize.y = _c_10mm2size(pda->dlga,pda->dlga->ptPaperSize.y);
     } else
 	FIXME("could not get dialog text for papersize cmbbox?\n");
-#define GETVAL(id,val) if (GetDlgItemTextA(hDlg,id,buf,sizeof(buf))>0) { val = _c_str2size(pda->dlga,buf); } else { FIXME("could not get dlgitemtexta for %x\n",id); }
+#define GETVAL(id,val) if (GetDlgItemTextA(hDlg,id,buf,sizeof(buf))>0) { val = _c_str2sizeA(pda->dlga,buf); } else { FIXME("could not get dlgitemtexta for %x\n",id); }
     GETVAL(edt4,pda->dlga->rtMargin.left);
     GETVAL(edt5,pda->dlga->rtMargin.top);
     GETVAL(edt6,pda->dlga->rtMargin.right);
@@ -2487,8 +2502,7 @@
     DEVMODEW	*dm;
     LPWSTR	devname,portname;
     WCHAR	papername[64];
-
-    char	buf[200];
+    WCHAR	buf[200];
 
     dn = GlobalLock(pda->pdlg.hDevNames);
     dm = GlobalLock(pda->pdlg.hDevMode);
@@ -2503,7 +2517,7 @@
 	pda->dlga->ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga,pda->dlga->ptPaperSize.y);
     } else
 	FIXME("could not get dialog text for papersize cmbbox?\n");
-#define GETVAL(id,val) if (GetDlgItemTextA(hDlg,id,buf,sizeof(buf))>0) { val = _c_str2size((LPPAGESETUPDLGA)pda->dlga,buf); } else { FIXME("could not get dlgitemtexta for %x\n",id); }
+#define GETVAL(id,val) if (GetDlgItemTextW(hDlg,id,buf,sizeof(buf)/sizeof(buf[0]))>0) { val = _c_str2sizeW(pda->dlga,buf); } else { FIXME("could not get dlgitemtextw for %x\n",id); }
     GETVAL(edt4,pda->dlga->rtMargin.left);
     GETVAL(edt5,pda->dlga->rtMargin.top);
     GETVAL(edt6,pda->dlga->rtMargin.right);
@@ -2703,13 +2717,16 @@
 static INT_PTR CALLBACK
 PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
+    const static WCHAR __WINE_PAGESETUPDLGDATA[] = 
+	{ '_', '_', 'W', 'I', 'N', 'E', '_', 'P', 'A', 'G', 'E', 
+	  'S', 'E', 'T', 'U', 'P', 'D', 'L', 'G', 'D', 'A', 'T', 'A', 0 };
     PageSetupDataW	*pda;
     BOOL		res = FALSE;
 
     if (uMsg==WM_INITDIALOG) {
 	res = TRUE;
         pda = (PageSetupDataW*)lParam;
-	SetPropA(hDlg,"__WINE_PAGESETUPDLGDATA",pda);
+	SetPropW(hDlg, __WINE_PAGESETUPDLGDATA, pda);
 	if (pda->dlga->Flags & PSD_ENABLEPAGESETUPHOOK) {
 	    res = pda->dlga->lpfnPageSetupHook(hDlg,uMsg,wParam,(LPARAM)pda->dlga);
 	    if (!res) {
@@ -2739,24 +2756,24 @@
 	}
 	/* We fill them out enabled or not */
 	if (pda->dlga->Flags & PSD_MARGINS) {
-	    char str[100];
+	    WCHAR str[100];
 	    _c_size2strW(pda,pda->dlga->rtMargin.left,str);
-	    SetDlgItemTextA(hDlg,edt4,str);
+	    SetDlgItemTextW(hDlg,edt4,str);
 	    _c_size2strW(pda,pda->dlga->rtMargin.top,str);
-	    SetDlgItemTextA(hDlg,edt5,str);
+	    SetDlgItemTextW(hDlg,edt5,str);
 	    _c_size2strW(pda,pda->dlga->rtMargin.right,str);
-	    SetDlgItemTextA(hDlg,edt6,str);
+	    SetDlgItemTextW(hDlg,edt6,str);
 	    _c_size2strW(pda,pda->dlga->rtMargin.bottom,str);
-	    SetDlgItemTextA(hDlg,edt7,str);
+	    SetDlgItemTextW(hDlg,edt7,str);
 	} else {
 	    /* default is 1 inch */
 	    DWORD size = _c_inch2size((LPPAGESETUPDLGA)pda->dlga,1000);
-	    char	str[20];
+	    WCHAR	str[20];
 	    _c_size2strW(pda,size,str);
-	    SetDlgItemTextA(hDlg,edt4,str);
-	    SetDlgItemTextA(hDlg,edt5,str);
-	    SetDlgItemTextA(hDlg,edt6,str);
-	    SetDlgItemTextA(hDlg,edt7,str);
+	    SetDlgItemTextW(hDlg,edt4,str);
+	    SetDlgItemTextW(hDlg,edt5,str);
+	    SetDlgItemTextW(hDlg,edt6,str);
+	    SetDlgItemTextW(hDlg,edt7,str);
 	}
 	PRINTDLG_PS_ChangePrinterW(hDlg,pda);
 	if (pda->dlga->Flags & PSD_DISABLEPAPER) {
@@ -2765,7 +2782,7 @@
 	}
 	return TRUE;
     } else {
-	pda = (PageSetupDataW*)GetPropA(hDlg,"__WINE_PAGESETUPDLGDATA");
+	pda = (PageSetupDataW*)GetPropW(hDlg, __WINE_PAGESETUPDLGDATA);
 	if (!pda) {
 	    WARN("__WINE_PAGESETUPDLGDATA prop not set?\n");
 	    return FALSE;

reactos/lib/comdlg32
printdlg16.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- printdlg16.c	11 Mar 2004 21:15:50 -0000	1.2
+++ printdlg16.c	20 Oct 2004 08:53:06 -0000	1.3
@@ -345,7 +345,7 @@
 ) {
     BOOL      bRet = FALSE;
     LPVOID   ptr;
-    HINSTANCE16 hInst = GetWindowWord( HWND_32(lppd->hwndOwner), GWL_HINSTANCE );
+    HINSTANCE16 hInst = GetWindowLongPtrW( HWND_32(lppd->hwndOwner), GWLP_HINSTANCE );
 
     if(TRACE_ON(commdlg)) {
         char flagstr[1000] = "";

reactos/lib/comdlg32
winehq2ros.patch 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- winehq2ros.patch	14 Aug 2004 19:21:01 -0000	1.6
+++ winehq2ros.patch	20 Oct 2004 08:53:06 -0000	1.7
@@ -1,11 +1,11 @@
 Index: printdlg.c
 ===================================================================
 RCS file: /home/wine/wine/dlls/commdlg/printdlg.c,v
-retrieving revision 1.78
-diff -u -r1.78 printdlg.c
---- printdlg.c	19 Jul 2004 19:35:28 -0000	1.78
-+++ printdlg.c	14 Aug 2004 19:34:17 -0000
-@@ -341,7 +341,7 @@
+retrieving revision 1.81
+diff -u -r1.81 printdlg.c
+--- printdlg.c	22 Sep 2004 19:36:47 -0000	1.81
++++ printdlg.c	20 Oct 2004 08:58:30 -0000
+@@ -339,7 +339,7 @@
  	        lpdm->dmCollate =
  		  (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
  	    if (lpdm->dmFields & DM_COPIES)
@@ -14,7 +14,7 @@
  	} else {
  	    if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
  	        lppd->Flags |= PD_COLLATE;
-@@ -416,7 +416,7 @@
+@@ -414,7 +414,7 @@
  	        lpdm->dmCollate =
  		  (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
  	    if (lpdm->dmFields & DM_COPIES)
@@ -23,7 +23,7 @@
  	} else {
  	    if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
  	        lppd->Flags |= PD_COLLATE;
-@@ -581,9 +581,9 @@
+@@ -579,9 +579,9 @@
                                        Sel, 0);
          if (dm) {
              if (nIDComboBox == cmb2)
@@ -35,7 +35,7 @@
          }
      }
      else {
-@@ -593,9 +593,9 @@
+@@ -591,9 +591,9 @@
           */
          if (dm) {
              if (nIDComboBox == cmb2)
@@ -47,7 +47,7 @@
          }
      }
  
-@@ -691,9 +691,9 @@
+@@ -689,9 +689,9 @@
                                        Sel, 0);
          if (dm) {
              if (nIDComboBox == cmb2)
@@ -59,7 +59,7 @@
          }
      }
      else {
-@@ -703,9 +703,9 @@
+@@ -701,9 +701,9 @@
           */
          if (dm) {
              if (nIDComboBox == cmb2)
@@ -71,7 +71,7 @@
          }
      }
  
-@@ -968,7 +968,7 @@
+@@ -966,7 +966,7 @@
  	  if (lppd->hDevMode == 0)
  	      copies = lppd->nCopies;
  	  else
@@ -80,7 +80,7 @@
  	  if(copies == 0) copies = 1;
  	  else if(copies < 0) copies = MAX_COPIES;
  	  SetDlgItemInt(hDlg, edt3, copies, FALSE);
-@@ -990,7 +990,7 @@
+@@ -988,7 +988,7 @@
              ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
  
      } else { /* PD_PRINTSETUP */
@@ -89,7 +89,7 @@
  
        PRINTDLG_SetUpPaperComboBoxA(hDlg, cmb2,
  				  PrintStructures->lpPrinterInfo->pPrinterName,
-@@ -1131,7 +1131,7 @@
+@@ -1128,7 +1128,7 @@
  	  if (lppd->hDevMode == 0)
  	      copies = lppd->nCopies;
  	  else
@@ -98,7 +98,7 @@
  	  if(copies == 0) copies = 1;
  	  else if(copies < 0) copies = MAX_COPIES;
  	  SetDlgItemInt(hDlg, edt3, copies, FALSE);
-@@ -1153,7 +1153,7 @@
+@@ -1150,7 +1150,7 @@
              ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
  
      } else { /* PD_PRINTSETUP */
@@ -107,7 +107,7 @@
  
        PRINTDLG_SetUpPaperComboBoxW(hDlg, cmb2,
  				  PrintStructures->lpPrinterInfo->pPrinterName,
-@@ -1498,7 +1498,7 @@
+@@ -1499,7 +1499,7 @@
      case rad1: /* Paperorientation */
          if (lppd->Flags & PD_PRINTSETUP)
          {
@@ -116,7 +116,7 @@
                SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                            (LPARAM)(PrintStructures->hPortraitIcon));
          }
-@@ -1507,7 +1507,7 @@
+@@ -1508,7 +1508,7 @@
      case rad2: /* Paperorientation */
          if (lppd->Flags & PD_PRINTSETUP)
          {
@@ -125,7 +125,7 @@
                SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                            (LPARAM)(PrintStructures->hLandscapeIcon));
          }
-@@ -1531,7 +1531,7 @@
+@@ -1532,7 +1532,7 @@
        {
  	  DWORD Sel = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
  	  if(Sel != CB_ERR)
@@ -134,7 +134,7 @@
  							    CB_GETITEMDATA,
  							    Sel, 0);
        }
-@@ -1541,7 +1541,7 @@
+@@ -1542,7 +1542,7 @@
        {
  	  DWORD Sel = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
  	  if(Sel != CB_ERR)
@@ -143,7 +143,7 @@
  							  CB_GETITEMDATA, Sel,
  							  0);
        }
-@@ -1552,8 +1552,8 @@
+@@ -1553,8 +1553,8 @@
  	case rad1:                         /* orientation */
  	case rad2:
  	    if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
@@ -154,7 +154,7 @@
  		    SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
  					(WPARAM)IMAGE_ICON,
  					(LPARAM)PrintStructures->hPortraitIcon);
-@@ -1562,8 +1562,8 @@
+@@ -1563,8 +1563,8 @@
  					(LPARAM)PrintStructures->hPortraitIcon);
  		}
  	    } else {
@@ -165,43 +165,43 @@
  		    SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
  					(WPARAM)IMAGE_ICON,
  					(LPARAM)PrintStructures->hLandscapeIcon);
-@@ -1662,7 +1662,7 @@
+@@ -1663,7 +1663,7 @@
      case rad1: /* Paperorientation */
          if (lppd->Flags & PD_PRINTSETUP)
          {
 -              lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
 +              lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
-               SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+               SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                            (LPARAM)(PrintStructures->hPortraitIcon));
          }
-@@ -1671,7 +1671,7 @@
+@@ -1672,7 +1672,7 @@
      case rad2: /* Paperorientation */
          if (lppd->Flags & PD_PRINTSETUP)
          {
 -              lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
 +              lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
-               SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
+               SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
                            (LPARAM)(PrintStructures->hLandscapeIcon));
          }
-@@ -1695,7 +1695,7 @@
+@@ -1696,7 +1696,7 @@
        {
- 	  DWORD Sel = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
+ 	  DWORD Sel = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
  	  if(Sel != CB_ERR)
--	      lpdm->u1.s1.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
-+	      lpdm->u.s.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
+-	      lpdm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
++	      lpdm->u.s.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
  							    CB_GETITEMDATA,
  							    Sel, 0);
        }
-@@ -1705,7 +1705,7 @@
+@@ -1706,7 +1706,7 @@
        {
- 	  DWORD Sel = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
+ 	  DWORD Sel = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
  	  if(Sel != CB_ERR)
 -	      lpdm->dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
 +	      lpdm->u.s.dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
  							  CB_GETITEMDATA, Sel,
  							  0);
        }
-@@ -1716,8 +1716,8 @@
+@@ -1717,8 +1717,8 @@
  	case rad1:                         /* orientation */
  	case rad2:
  	    if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
@@ -209,10 +209,10 @@
 -		    lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
 +	        if(lpdm->u.s.dmOrientation != DMORIENT_PORTRAIT) {
 +		    lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
- 		    SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
+ 		    SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
  					(WPARAM)IMAGE_ICON,
  					(LPARAM)PrintStructures->hPortraitIcon);
-@@ -1726,8 +1726,8 @@
+@@ -1727,8 +1727,8 @@
  					(LPARAM)PrintStructures->hPortraitIcon);
  		}
  	    } else {
@@ -220,10 +220,10 @@
 -	            lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
 +	        if(lpdm->u.s.dmOrientation != DMORIENT_LANDSCAPE) {
 +	            lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
- 		    SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
+ 		    SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
  					(WPARAM)IMAGE_ICON,
  					(LPARAM)PrintStructures->hLandscapeIcon);
-@@ -2919,7 +2919,7 @@
+@@ -2936,7 +2936,7 @@
  /***********************************************************************
   *	PrintDlgExA (COMDLG32.@)
   */
@@ -232,7 +232,7 @@
  {
  	FIXME("stub\n");
  	return E_NOTIMPL;
-@@ -2927,7 +2927,7 @@
+@@ -2944,7 +2944,7 @@
  /***********************************************************************
   *	PrintDlgExW (COMDLG32.@)
   */
CVSspam 0.2.8