Improve handling of custom dialog templates passed to GetOpenFileName

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This patch is aiming to fix file open dialogs in Dreamweaver
without breaking Visio and some other programs using custom
templates for GetOpenFileName API.

Some notes:

1. Controls arranging algorithm *highly* depends on the sizes of
child and parent dialogs. They must have exactly the same size as
those provided by MS. I've added a note in each commdlg resource
file and corrected all sizes of the NEWFILEOPENORD template in all
.rc files. Other dialog templates must be verified as well.

2. My tests show that a custom template dialog proc receives
original (i.e. NOT RESIZED in the case of OFN_HIDEREADONLY and
NOT REARRANGED) dialog template on WM_INITDIALOG.

I've removed that code from WM_INITDIALOG.

Changelog:
    Dmitry Timoshkov <dmitry@codeweavers.com>
    Improve handling of custom dialog templates passed to GetOpenFileName.

-- 
Dmitry.

diff -u cvs/hq/wine/dlls/commdlg/cdlg_Ca.rc wine/dlls/commdlg/cdlg_Ca.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Ca.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Ca.rc	Wed Jul 23 16:30:32 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Cn.rc wine/dlls/commdlg/cdlg_Cn.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Cn.rc	Tue Nov 26 11:21:18 2002
+++ wine/dlls/commdlg/cdlg_Cn.rc	Wed Jul 23 16:31:07 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -318,12 +322,10 @@ BEGIN
   PUSHBUTTON "´òÓ¡»ú(&P)...", psh3, 184, 220, 48, 14
 END
 
-
-
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "´ò¿ª"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
     LTEXT	"ËÑÑ°(&I)",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Cs.rc wine/dlls/commdlg/cdlg_Cs.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Cs.rc	Wed Mar 27 11:49:01 2002
+++ wine/dlls/commdlg/cdlg_Cs.rc	Wed Jul 23 16:31:23 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Da.rc wine/dlls/commdlg/cdlg_Da.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Da.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Da.rc	Wed Jul 23 16:31:31 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_De.rc wine/dlls/commdlg/cdlg_De.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_De.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_De.rc	Wed Jul 23 16:31:38 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -240,10 +244,10 @@ FONT 8, "Helv"
  PUSHBUTTON "&Hilfe", pshHelp, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
 }
 
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 307, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Öffnen"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
     LTEXT	"&Suche in",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_En.rc wine/dlls/commdlg/cdlg_En.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_En.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_En.rc	Wed Jul 23 16:31:44 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -318,14 +322,12 @@ BEGIN
   PUSHBUTTON "P&rinter...", psh3, 184, 220, 48, 14
 END
 
-
-
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Open"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
-    LTEXT	"Look &in",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
+    LTEXT	"Look &in:",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
 
     LTEXT	"" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE
@@ -334,7 +336,7 @@ FONT 8, "helv"
     LTEXT	"File &name:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY
     EDITTEXT	IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
 
-    LTEXT	"Files of &type",IDC_FILETYPESTATIC,5,128,42,8, SS_NOTIFY
+    LTEXT	"Files of &type:",IDC_FILETYPESTATIC,5,128,42,8, SS_NOTIFY
     COMBOBOX	IDC_FILETYPE,54,126,155,53,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
 
     CONTROL	"Open as &read-only",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Eo.rc wine/dlls/commdlg/cdlg_Eo.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Eo.rc	Wed Mar 27 11:49:01 2002
+++ wine/dlls/commdlg/cdlg_Eo.rc	Wed Jul 23 16:31:49 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Es.rc wine/dlls/commdlg/cdlg_Es.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Es.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Es.rc	Wed Jul 23 16:31:54 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Fi.rc wine/dlls/commdlg/cdlg_Fi.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Fi.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Fi.rc	Wed Jul 23 16:31:59 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Fr.rc wine/dlls/commdlg/cdlg_Fr.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Fr.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Fr.rc	Wed Jul 23 16:32:05 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -318,12 +322,10 @@ BEGIN
   PUSHBUTTON "&Imprimante...", psh3, 184, 220, 48, 14
 END
 
-
-
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 307, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Ouvrir"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
     LTEXT	"&Rechercher dans",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Hu.rc wine/dlls/commdlg/cdlg_Hu.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Hu.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Hu.rc	Wed Jul 23 16:32:11 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_It.rc wine/dlls/commdlg/cdlg_It.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_It.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_It.rc	Wed Jul 23 16:32:18 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Ja.rc wine/dlls/commdlg/cdlg_Ja.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Ja.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Ja.rc	Wed Jul 23 16:32:24 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -288,9 +292,8 @@ BEGIN
     CONTROL         "?¡(&A)",     rad2,"Button",BS_AUTORADIOBUTTON,224,126,52,12
 END
 
-
 NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "̧²Ù?ð?J?­"
 FONT 8, "?l?r ?o?S?V?b?N"
 {
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Ko.rc wine/dlls/commdlg/cdlg_Ko.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Ko.rc	Sat Jun 29 20:06:32 2002
+++ wine/dlls/commdlg/cdlg_Ko.rc	Wed Jul 23 16:32:34 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -268,8 +272,8 @@ FONT 9, "Helv"
  PUSHBUTTON "µµ¿ò¸»(&H)", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
 }
 
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "¿­±â"
 FONT 9, "Helv"
 {
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Nl.rc wine/dlls/commdlg/cdlg_Nl.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Nl.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Nl.rc	Wed Jul 23 16:32:42 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_No.rc wine/dlls/commdlg/cdlg_No.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_No.rc	Fri Jun 14 19:00:44 2002
+++ wine/dlls/commdlg/cdlg_No.rc	Wed Jul 23 16:32:51 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_NORWEGIAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Pl.rc wine/dlls/commdlg/cdlg_Pl.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Pl.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Pl.rc	Wed Jul 23 16:32:56 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
 
 /* LTEXT "Wyswietl pliki &typu:", 1089, 6, 104, 90, 9 */
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Pt.rc wine/dlls/commdlg/cdlg_Pt.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Pt.rc	Fri Jul 11 13:15:43 2003
+++ wine/dlls/commdlg/cdlg_Pt.rc	Wed Jul 23 16:33:03 2003
@@ -17,6 +17,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -320,9 +324,9 @@ BEGIN
 END
 
 NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Abrir"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
     LTEXT	"Procurar &em",IDC_LOOKINSTATIC,7,6,27,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,36,3,138,300,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Ru.rc wine/dlls/commdlg/cdlg_Ru.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Ru.rc	Fri Jul 11 13:15:44 2003
+++ wine/dlls/commdlg/cdlg_Ru.rc	Wed Jul 23 16:33:15 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -287,11 +291,10 @@ BEGIN
     CONTROL         "Ë&àíäøàôò",     rad2,"Button",BS_AUTORADIOBUTTON,224,126,52,12
 END
 
-
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Îòêðûòü"
-FONT 8, "Ms Sans Serif"
+FONT 8, "MS Sans Serif"
 {
     LTEXT	"Èñêàòü &â",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Si.rc wine/dlls/commdlg/cdlg_Si.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Si.rc	Wed Jun 25 17:51:42 2003
+++ wine/dlls/commdlg/cdlg_Si.rc	Wed Jul 23 16:33:21 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -318,10 +322,8 @@ BEGIN
   PUSHBUTTON "&Tiskalnik ...", psh3, 184, 220, 48, 14
 END
 
-
-
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Odpiranje"
 FONT 8, "MS Sans Serif"
 {
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Sk.rc wine/dlls/commdlg/cdlg_Sk.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Sk.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Sk.rc	Wed Jul 23 16:33:28 2003
@@ -16,12 +16,16 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
 
 /* Slovak strings in CP1250 */
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
-STYLE WS_CLIPCHILDREN | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Otvorenie súboru"
 FONT 8, "Helv"
 {
@@ -289,11 +293,10 @@ BEGIN
     CONTROL         "Na ?í&rku",     rad2,"Button",BS_AUTORADIOBUTTON,224,126,52,12
 END
 
-
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Otvori?"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
     LTEXT	"H¾ada? &v",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Sv.rc wine/dlls/commdlg/cdlg_Sv.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Sv.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Sv.rc	Wed Jul 23 16:33:33 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
 
 OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
@@ -311,10 +315,10 @@ BEGIN
   PUSHBUTTON "&Skrivare...", psh3, 184, 220, 48, 14
 END
 
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "Öppna"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
  LTEXT       "Leta &i",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
  COMBOBOX    IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Wa.rc wine/dlls/commdlg/cdlg_Wa.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Wa.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Wa.rc	Wed Jul 23 16:33:38 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_WALON, SUBLANG_DEFAULT
 
 /*
diff -u cvs/hq/wine/dlls/commdlg/cdlg_Zh.rc wine/dlls/commdlg/cdlg_Zh.rc
--- cvs/hq/wine/dlls/commdlg/cdlg_Zh.rc	Fri Feb 21 15:19:40 2003
+++ wine/dlls/commdlg/cdlg_Zh.rc	Wed Jul 23 16:33:50 2003
@@ -16,6 +16,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/*
+ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES.
+ */
+
 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
 #pragma code_page(936)  /* FIXME: default for CHINESE_TRADITIONAL is 950 */
 
@@ -163,10 +167,10 @@ FONT 8, "Helv"
  PUSHBUTTON "ÇóÖú(&H)", pshHelp	 , 174, 75, 50, 14, WS_GROUP | WS_TABSTOP
 }
 
-NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 287, 165
-STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
+NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN
 CAPTION "é_?¢Åf?n"
-FONT 8, "helv"
+FONT 8, "Helv"
 {
     LTEXT	"ËÑ?¤Î»ÖÃ(&I)",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
     COMBOBOX	IDC_LOOKIN,52,3,130,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
diff -u cvs/hq/wine/dlls/commdlg/filedlg95.c wine/dlls/commdlg/filedlg95.c
--- cvs/hq/wine/dlls/commdlg/filedlg95.c	Mon Jul 21 11:29:54 2003
+++ wine/dlls/commdlg/filedlg95.c	Tue Jul 22 23:14:32 2003
@@ -502,19 +502,30 @@ BOOL  WINAPI GetFileDialog95W(LPOPENFILE
   return ret;
 }
 
-void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg)
+/***********************************************************************
+ *      ArrangeCtrlPositions [internal]
+ *
+ * NOTE: Do not change anything here without a lot of testing.
+ */
+static void ArrangeCtrlPositions(HWND hwndChildDlg, HWND hwndParentDlg, BOOL hide_help)
 {
-    HWND hwndChild,hwndStc32;
-    RECT rectParent, rectChild, rectCtrl, rectStc32, rectTemp;
-    POINT ptMoveCtl;
-    POINT ptParentClient;
-
-    TRACE("\n");
+    HWND hwndChild, hwndStc32;
+    RECT rectParent, rectChild, rectStc32;
+    INT help_fixup = 0;
 
-    ptMoveCtl.x = ptMoveCtl.y = 0;
-    hwndStc32=GetDlgItem(hwndChildDlg,stc32);
-    GetClientRect(hwndParentDlg,&rectParent);
-    GetClientRect(hwndChildDlg,&rectChild);
+    /* Take into account if open as read only checkbox and help button
+     * are hidden
+     */
+     if (hide_help)
+     {
+         RECT rectHelp, rectCancel;
+         GetWindowRect(GetDlgItem(hwndParentDlg, pshHelp), &rectHelp);
+         GetWindowRect(GetDlgItem(hwndParentDlg, IDCANCEL), &rectCancel);
+         /* subtract the height of the help button plus the space between
+          * the help button and the cancel button to the height of the dialog
+          */
+          help_fixup = rectHelp.bottom - rectCancel.bottom;
+    }
 
     /*
       There are two possibilities to add components to the default file dialog box.
@@ -528,119 +539,133 @@ void ArrangeCtrlPositions( HWND hwndChil
       of the standard file dialog box. If they are above the stc32 component, it is placed above and so on....
       
      */
-    if(hwndStc32)
-    {      
-      GetWindowRect(hwndStc32,&rectStc32);
-      MapWindowPoints(0, hwndChildDlg,(LPPOINT)&rectStc32,2);
-      CopyRect(&rectTemp,&rectStc32);      
 
-      if ((rectParent.right-rectParent.left)>(rectChild.right-rectChild.left)) {
-	ptParentClient.x = (rectParent.right-rectParent.left)+ ((rectChild.right-rectChild.left) - (rectStc32.right-rectStc32.left));
-      } else {
-	ptParentClient.x = max((rectParent.right-rectParent.left),(rectChild.right-rectChild.left));
-      }
-      ptMoveCtl.x = (rectParent.right-rectParent.left) ;
-   
-      if ((rectParent.bottom-rectParent.top)>(rectChild.bottom-rectChild.top)) {
-	ptParentClient.y = (rectParent.bottom-rectParent.top) + (rectChild.bottom-rectChild.top) - (rectStc32.bottom-rectStc32.top);
-      } else {
-	ptParentClient.y = max((rectParent.bottom-rectParent.top),(rectChild.bottom-rectChild.top));
-      }
-      ptMoveCtl.y = (rectParent.bottom-rectParent.top) ;
+    GetClientRect(hwndParentDlg, &rectParent);
+
+    /* when arranging controls we have to use fixed parent size */
+    rectParent.bottom -= help_fixup;
+
+    hwndStc32 = GetDlgItem(hwndChildDlg, stc32);
+    if (hwndStc32)
+    {
+        GetWindowRect(hwndStc32, &rectStc32);
+        MapWindowPoints(0, hwndChildDlg, (LPPOINT)&rectStc32, 2);
+
+        /* set the size of the stc32 control according to the size of
+         * client area of the parent dialog
+         */
+        SetWindowPos(hwndStc32, 0,
+                     0, 0,
+                     rectParent.right, rectParent.bottom,
+                     SWP_NOMOVE | SWP_NOZORDER);
     }
     else
+        SetRectEmpty(&rectStc32);
+
+    /* this part moves controls of the child dialog */
+    hwndChild = GetWindow(hwndChildDlg, GW_CHILD);
+    while (hwndChild)
     {
-      SetRectEmpty(&rectTemp);
-      /* After some tests it appears that windows never extends the width in that case */
-      ptParentClient.x = (rectParent.right-rectParent.left);
-      ptParentClient.y = (rectParent.bottom-rectParent.top);
-      /* Some applications use an empty child window, add this test to prevent garbage */
-      if (GetWindow(hwndChildDlg,GW_CHILD))
-	ptParentClient.y += (rectChild.bottom-rectChild.top);
-      ptMoveCtl.y = rectParent.bottom-rectParent.top;
-      ptMoveCtl.x = 0;
-    }
-    /* Set the new size of the window from the extra space needed */
-    SetRect(&rectParent,rectParent.left,rectParent.top,rectParent.left+ptParentClient.x,rectParent.top+ptParentClient.y);
-    AdjustWindowRectEx( &rectParent,GetWindowLongA(hwndParentDlg,GWL_STYLE),FALSE,GetWindowLongA(hwndParentDlg,GWL_EXSTYLE));
-
-    SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x,ptParentClient.y, SWP_NOZORDER );
-    SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left),
-		 (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER);
-      
-    /* 
-       This part moves the child components below the file dialog box if stc32 is not present
-       and place them accordinf to stc32 if it is present.
-     */
-    hwndChild = GetWindow(hwndChildDlg,GW_CHILD);
-    if (hwndChild )
+        if (hwndChild != hwndStc32)
+        {
+            GetWindowRect(hwndChild, &rectChild);
+            MapWindowPoints(0, hwndChildDlg, (LPPOINT)&rectChild, 2);
+
+            /* move only if stc32 exist */
+            if (hwndStc32 && rectChild.left > rectStc32.right)
+            {
+                /* move to the right of visible controls of the parent dialog */
+                rectChild.left += rectParent.right;
+                rectChild.left -= rectStc32.right;
+            }
+            /* move even if stc32 doesn't exist */
+            if (rectChild.top > rectStc32.bottom)
+            {
+                /* move below visible controls of the parent dialog */
+                rectChild.top += rectParent.bottom;
+                rectChild.top -= rectStc32.bottom - rectStc32.top;
+            }
+
+            SetWindowPos(hwndChild, 0, rectChild.left, rectChild.top,
+                         0, 0, SWP_NOSIZE | SWP_NOZORDER);
+        }
+        hwndChild = GetWindow(hwndChild, GW_HWNDNEXT);
+    }
+
+    /* this part moves controls of the parent dialog */
+    hwndChild = GetWindow(hwndParentDlg, GW_CHILD);
+    while (hwndChild)
     {
-      do
-      {
-        if(hwndChild != hwndStc32)
+        if (hwndChild != hwndChildDlg)
         {
-          if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE)
-				continue;
-          GetWindowRect(hwndChild,&rectCtrl);
-          MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2);
-          /*
-            If stc32 is present, moves the child components as required.
-          */
-   	  if ((rectCtrl.left >= rectTemp.right) && ((rectCtrl.left+ptMoveCtl.x)<rectParent.right)){
-	    rectCtrl.left += ptMoveCtl.x;
-	    rectCtrl.right +=ptMoveCtl.x; 
-	  }
-	  if ((rectCtrl.top >= rectTemp.bottom) && ((rectCtrl.top+ptMoveCtl.y)<rectParent.bottom)){
-	    rectCtrl.top  += ptMoveCtl.y;
-	    rectCtrl.bottom  += ptMoveCtl.y;
-	  }
-    
-          SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top,
-				rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top,
-				SWP_NOSIZE | SWP_NOZORDER );
+            GetWindowRect(hwndChild, &rectChild);
+            MapWindowPoints(0, hwndParentDlg, (LPPOINT)&rectChild, 2);
+
+            /* left,top of stc32 marks the position of controls
+             * from the parent dialog
+             */
+            rectChild.left += rectStc32.left;
+            rectChild.top += rectStc32.top;
+
+            SetWindowPos(hwndChild, 0, rectChild.left, rectChild.top,
+                         0, 0, SWP_NOSIZE | SWP_NOZORDER);
         }
-      } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != NULL);
-    }   
+        hwndChild = GetWindow(hwndChild, GW_HWNDNEXT);
+    }
 
-    /*
-      This part moves the components of the default file dialog box according to the stc32 coordinates.
-     */
-    hwndChild = GetWindow(hwndParentDlg,GW_CHILD);
-    if(hwndStc32)
+    /* calculate the size of the resulting dialog */
+
+    /* here we have to use original parent size */
+    GetClientRect(hwndParentDlg, &rectParent);
+    GetClientRect(hwndChildDlg, &rectChild);
+
+    if (hwndStc32)
     {
-      GetWindowRect(hwndStc32,&rectStc32);
-      MapWindowPoints( 0, hwndChildDlg,(LPPOINT)&rectStc32,2);
-      ptMoveCtl.x = rectStc32.left - 0;
-      ptMoveCtl.y = rectStc32.top - 0;
-      if (hwndChild )
-      {
-        do
+        if (rectParent.right > rectChild.right)
         {
-          if(hwndChild != hwndChildDlg)
-          {
-            if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE)
-              continue;
-	    GetWindowRect(hwndChild,&rectCtrl);
-            MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2);
-
-            rectCtrl.left += ptMoveCtl.x;
-            rectCtrl.right += ptMoveCtl.x;
-            rectCtrl.top += ptMoveCtl.y;
-            rectCtrl.bottom += ptMoveCtl.y;
-
-            SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top,
-                rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top,
-                SWP_NOSIZE |SWP_NOZORDER );
-          }
-        } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != NULL);
-      }
+            rectParent.right += rectChild.right;
+            rectParent.right -= rectStc32.right - rectStc32.left;
+        }
+        else
+        {
+            rectParent.right = rectChild.right;
+        }
+
+        if (rectParent.bottom > rectChild.bottom)
+        {
+            rectParent.bottom += rectChild.bottom;
+            rectParent.bottom -= rectStc32.bottom - rectStc32.top;
+        }
+        else
+        {
+            rectParent.bottom = rectChild.bottom;
+        }
+    }
+    else
+    {
+        rectParent.bottom += rectChild.bottom;
     }
-}
 
+    /* finally use fixed parent size */
+    rectParent.bottom -= help_fixup;
+
+    /* set the size of the child dialog */
+    SetWindowPos(hwndChildDlg, HWND_BOTTOM,
+                 0, 0, rectParent.right, rectParent.bottom, SWP_NOACTIVATE);
+
+    /* set the size of the parent dialog */
+    AdjustWindowRectEx(&rectParent, GetWindowLongW(hwndParentDlg, GWL_STYLE),
+                       FALSE, GetWindowLongW(hwndParentDlg, GWL_EXSTYLE));
+    SetWindowPos(hwndParentDlg, 0,
+                 0, 0,
+                 rectParent.right - rectParent.left,
+                 rectParent.bottom - rectParent.top,
+                 SWP_NOMOVE | SWP_NOZORDER);
+}
 
 INT_PTR CALLBACK FileOpenDlgProcUserTemplate(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
-    FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(GetParent(hwnd),FileOpenDlgInfosStr);
+    FileOpenDlgInfos *fodInfos;
 
 #if 0
     TRACE("0x%04x\n", uMsg);
@@ -650,32 +675,8 @@ INT_PTR CALLBACK FileOpenDlgProcUserTemp
     {
       case WM_INITDIALOG:
       {
-        /* Hide caption since some program may leave it */
-        DWORD Style = GetWindowLongA(hwnd, GWL_STYLE);
-        if (Style & WS_CAPTION) SetWindowLongA(hwnd, GWL_STYLE, Style & (~WS_CAPTION));
-
         fodInfos = (FileOpenDlgInfos *)lParam;
         lParam = (LPARAM) fodInfos->ofnInfos;
-        ArrangeCtrlPositions(hwnd,GetParent(hwnd));
-	
-	/* If the help button and the readonly button are hidden
-	   we have to resize the dialog before calling the hook procedure 
-	   because some apps use the size to resize the window.
-	 */
-	if ( (fodInfos->ofnInfos->Flags & OFN_HIDEREADONLY) &&
-	     (!(fodInfos->ofnInfos->Flags &
-		(OFN_SHOWHELP|OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE))))
-	  {
-	    RECT rectDlg, rectHelp, rectCancel;
-	    GetWindowRect(hwnd, &rectDlg);
-	    GetWindowRect(GetDlgItem(hwnd, pshHelp), &rectHelp);
-	    GetWindowRect(GetDlgItem(hwnd, IDCANCEL), &rectCancel);
-	    /* subtract the height of the help button plus the space between
-	       the help button and the cancel button to the height of the dialog */
-	    SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left,
-                 (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom),
-                 SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
-	  }
 
         if(fodInfos && IsHooked(fodInfos))
           return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam);
@@ -683,10 +684,11 @@ INT_PTR CALLBACK FileOpenDlgProcUserTemp
       }
     }
 
+    fodInfos = (FileOpenDlgInfos *) GetPropA(GetParent(hwnd),FileOpenDlgInfosStr);
     if(fodInfos && IsHooked(fodInfos))
       return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam);
 
-    return DefWindowProcA(hwnd,uMsg,wParam,lParam);
+    return 0;
 }
 
 HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
@@ -703,8 +705,7 @@ HWND CreateTemplateDialog(FileOpenDlgInf
      * structure's hInstance parameter is not a HINSTANCE, but
      * instead a pointer to a template resource to use.
      */
-    if (fodInfos->ofnInfos->Flags & OFN_ENABLETEMPLATE ||
-        fodInfos->ofnInfos->Flags & OFN_ENABLETEMPLATEHANDLE)
+    if (fodInfos->ofnInfos->Flags & (OFN_ENABLETEMPLATE | OFN_ENABLETEMPLATEHANDLE))
     {
       HINSTANCE hinst;
       if (fodInfos->ofnInfos->Flags  & OFN_ENABLETEMPLATEHANDLE)
@@ -741,7 +742,7 @@ HWND CreateTemplateDialog(FileOpenDlgInf
           return NULL;
     	}
       }
-      hChildDlg= CreateDialogIndirectParamA(hinst, template,
+      hChildDlg= CreateDialogIndirectParamA(COMDLG32_hInstance, template,
            hwnd, FileOpenDlgProcUserTemplate, (LPARAM)fodInfos);
       if(hChildDlg)
       {
@@ -757,16 +758,16 @@ HWND CreateTemplateDialog(FileOpenDlgInf
          WORD menu,class,title;
          } temp;
       GetClientRect(hwnd,&rectHwnd);
-      temp.tmplate.style = WS_CHILD | WS_CLIPSIBLINGS;
+      temp.tmplate.style = WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | DS_CONTROL | DS_3DLOOK;
       temp.tmplate.dwExtendedStyle = 0;
       temp.tmplate.cdit = 0;
       temp.tmplate.x = 0;
       temp.tmplate.y = 0;
-      temp.tmplate.cx = rectHwnd.right-rectHwnd.left;
-      temp.tmplate.cy = rectHwnd.bottom-rectHwnd.top;
+      temp.tmplate.cx = 0;
+      temp.tmplate.cy = 0;
       temp.menu = temp.class = temp.title = 0;
 
-      hChildDlg = CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,&temp.tmplate,
+      hChildDlg = CreateDialogIndirectParamA(COMDLG32_hInstance, &temp.tmplate,
                   hwnd, FileOpenDlgProcUserTemplate, (LPARAM)fodInfos);
 
       return hChildDlg;
@@ -799,6 +800,7 @@ HRESULT SendCustomDlgNotificationMessage
         ofnNotify.hdr.idFrom=0;
         ofnNotify.hdr.code = uCode;
         ofnNotify.lpOFN = fodInfos->ofnInfos;
+        ofnNotify.pszFile = NULL;
 	TRACE("CALL NOTIFY for %x\n", uCode);
 	ret = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg,WM_NOTIFY,0,(LPARAM)&ofnNotify);
 	TRACE("RET NOTIFY\n");
@@ -929,11 +931,13 @@ INT_PTR CALLBACK FileOpenDlgProc95(HWND 
 
          FILEDLG95_InitControls(hwnd);
       	 FILEDLG95_FillControls(hwnd, wParam, lParam);
+         if (fodInfos->DlgInfos.hwndCustomDlg)
+             ArrangeCtrlPositions(fodInfos->DlgInfos.hwndCustomDlg, hwnd,
+                 (fodInfos->ofnInfos->Flags & (OFN_HIDEREADONLY | OFN_SHOWHELP)) == OFN_HIDEREADONLY);
+
          SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE);
          SendCustomDlgNotificationMessage(hwnd,CDN_FOLDERCHANGE);
          SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE);
-         SetWindowPos(fodInfos->DlgInfos.hwndCustomDlg, HWND_BOTTOM,
-                      0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
          return 0;
        }
     case WM_COMMAND:
@@ -1069,12 +1073,10 @@ static LRESULT FILEDLG95_InitControls(HW
   rectTB.top = rectlook.top-1;
 
   fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, NULL,
-        WS_CHILD | WS_GROUP | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE,
-        0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMDLG32_hInstance, NULL);
-
-  SetWindowPos(fodInfos->DlgInfos.hwndTB, 0,
-  	rectTB.left,rectTB.top, rectTB.right-rectTB.left, rectTB.bottom-rectTB.top,
-	SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER );
+        WS_CHILD | WS_GROUP | WS_VISIBLE | WS_CLIPSIBLINGS | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE,
+        rectTB.left, rectTB.top,
+        rectTB.right - rectTB.left, rectTB.bottom - rectTB.top,
+        hwnd, (HMENU)IDC_TOOLBAR, COMDLG32_hInstance, NULL);
 
   SendMessageA(fodInfos->DlgInfos.hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0);
 
@@ -1264,6 +1266,7 @@ static LRESULT FILEDLG95_InitControls(HW
           TRACE("No initial dir specified, using current dir of %s\n", debugstr_w(fodInfos->initdir));
       }
   }
+  SetFocus(GetDlgItem(hwnd, IDC_FILENAME));
   TRACE("After manipulation, file = %s, dir = %s\n", debugstr_w(fodInfos->filename), debugstr_w(fodInfos->initdir));
 
   /* Must the open as read only check box be checked ?*/
@@ -1272,16 +1275,18 @@ static LRESULT FILEDLG95_InitControls(HW
     SendDlgItemMessageA(hwnd,IDC_OPENREADONLY,BM_SETCHECK,(WPARAM)TRUE,0);
   }
 
-  /* Must the open as read only check box be hid ?*/
+  /* Must the open as read only check box be hidden? */
   if(fodInfos->ofnInfos->Flags & OFN_HIDEREADONLY)
   {
     ShowWindow(GetDlgItem(hwnd,IDC_OPENREADONLY),SW_HIDE);
+    EnableWindow(GetDlgItem(hwnd, IDC_OPENREADONLY), FALSE);
   }
 
-  /* Must the help button be hid ?*/
+  /* Must the help button be hidden? */
   if (!(fodInfos->ofnInfos->Flags & OFN_SHOWHELP))
   {
     ShowWindow(GetDlgItem(hwnd, pshHelp), SW_HIDE);
+    EnableWindow(GetDlgItem(hwnd, pshHelp), FALSE);
   }
 
   /* Resize the height, if open as read only checkbox ad help button
diff -u cvs/hq/wine/dlls/commdlg/filedlgbrowser.h wine/dlls/commdlg/filedlgbrowser.h
--- cvs/hq/wine/dlls/commdlg/filedlgbrowser.h	Mon Jul 21 11:29:54 2003
+++ wine/dlls/commdlg/filedlgbrowser.h	Tue Jul 22 12:27:04 2003
@@ -138,7 +138,7 @@ typedef struct
 
 #define IDC_FILENAME                    edt1
 
-#define IDC_TOOLBAR			ctl1
+#define IDC_TOOLBAR			1
 
 /***********************************************************************
  * Prototypes for the methods of the IShellBrowserImpl class





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux