https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de8d156e2cfa43e07c7ae…
commit de8d156e2cfa43e07c7ae07176e52b90ad7b5a95
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Oct 21 22:25:16 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Oct 21 22:25:16 2020 +0900
[SHELL32] Resizable for SHBrowseForFolder (#3299)
Make the dialog box of SHBrowseForFolder function resizable. CORE-17341
---
dll/win32/shell32/lang/bg-BG.rc | 2 +-
dll/win32/shell32/lang/ca-ES.rc | 2 +-
dll/win32/shell32/lang/cs-CZ.rc | 2 +-
dll/win32/shell32/lang/da-DK.rc | 2 +-
dll/win32/shell32/lang/de-DE.rc | 2 +-
dll/win32/shell32/lang/el-GR.rc | 2 +-
dll/win32/shell32/lang/en-GB.rc | 2 +-
dll/win32/shell32/lang/en-US.rc | 2 +-
dll/win32/shell32/lang/es-ES.rc | 2 +-
dll/win32/shell32/lang/et-EE.rc | 2 +-
dll/win32/shell32/lang/fi-FI.rc | 2 +-
dll/win32/shell32/lang/fr-FR.rc | 2 +-
dll/win32/shell32/lang/he-IL.rc | 2 +-
dll/win32/shell32/lang/hi-IN.rc | 2 +-
dll/win32/shell32/lang/hu-HU.rc | 2 +-
dll/win32/shell32/lang/id-ID.rc | 2 +-
dll/win32/shell32/lang/it-IT.rc | 2 +-
dll/win32/shell32/lang/ja-JP.rc | 2 +-
dll/win32/shell32/lang/ko-KR.rc | 2 +-
dll/win32/shell32/lang/nl-NL.rc | 2 +-
dll/win32/shell32/lang/no-NO.rc | 2 +-
dll/win32/shell32/lang/pl-PL.rc | 2 +-
dll/win32/shell32/lang/pt-BR.rc | 2 +-
dll/win32/shell32/lang/pt-PT.rc | 2 +-
dll/win32/shell32/lang/ro-RO.rc | 2 +-
dll/win32/shell32/lang/ru-RU.rc | 2 +-
dll/win32/shell32/lang/sk-SK.rc | 2 +-
dll/win32/shell32/lang/sl-SI.rc | 2 +-
dll/win32/shell32/lang/sq-AL.rc | 2 +-
dll/win32/shell32/lang/sv-SE.rc | 2 +-
dll/win32/shell32/lang/tr-TR.rc | 2 +-
dll/win32/shell32/lang/uk-UA.rc | 2 +-
dll/win32/shell32/lang/zh-CN.rc | 2 +-
dll/win32/shell32/lang/zh-TW.rc | 2 +-
dll/win32/shell32/wine/brsfolder.c | 22 ++++
sdk/include/reactos/layout.h | 232 +++++++++++++++++++++++++++++++++++++
36 files changed, 288 insertions(+), 34 deletions(-)
diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc
index f256ece6cae..a4189880a22 100644
--- a/dll/win32/shell32/lang/bg-BG.rc
+++ b/dll/win32/shell32/lang/bg-BG.rc
@@ -102,7 +102,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Търсене на папка"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc
index ff4656cd30c..c4a7f66b1ce 100644
--- a/dll/win32/shell32/lang/ca-ES.rc
+++ b/dll/win32/shell32/lang/ca-ES.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc
index 490b68aa090..4776320d3c0 100644
--- a/dll/win32/shell32/lang/cs-CZ.rc
+++ b/dll/win32/shell32/lang/cs-CZ.rc
@@ -107,7 +107,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Procházet pro složku"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc
index 0f86d9a3c26..18825835a7f 100644
--- a/dll/win32/shell32/lang/da-DK.rc
+++ b/dll/win32/shell32/lang/da-DK.rc
@@ -107,7 +107,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc
index 6e94e825518..841973d5b28 100644
--- a/dll/win32/shell32/lang/de-DE.rc
+++ b/dll/win32/shell32/lang/de-DE.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Verzeichnis auswählen"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc
index ba7f4182855..4513166c9a9 100644
--- a/dll/win32/shell32/lang/el-GR.rc
+++ b/dll/win32/shell32/lang/el-GR.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Αναζήτηση φακέλου"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc
index 63424343e74..576daf044ab 100644
--- a/dll/win32/shell32/lang/en-GB.rc
+++ b/dll/win32/shell32/lang/en-GB.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc
index ef2dcf0590e..ddcedb8b2ea 100644
--- a/dll/win32/shell32/lang/en-US.rc
+++ b/dll/win32/shell32/lang/en-US.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc
index 41adf26c018..acef0a2aa29 100644
--- a/dll/win32/shell32/lang/es-ES.rc
+++ b/dll/win32/shell32/lang/es-ES.rc
@@ -110,7 +110,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Buscar carpeta"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc
index 4b308e77c23..1f9497e51b4 100644
--- a/dll/win32/shell32/lang/et-EE.rc
+++ b/dll/win32/shell32/lang/et-EE.rc
@@ -108,7 +108,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Vali kaust"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc
index 30071a27944..322457ad802 100644
--- a/dll/win32/shell32/lang/fi-FI.rc
+++ b/dll/win32/shell32/lang/fi-FI.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc
index f709c10405e..108872f06d8 100644
--- a/dll/win32/shell32/lang/fr-FR.rc
+++ b/dll/win32/shell32/lang/fr-FR.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Rechercher un dossier"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc
index b27f62e4bdc..669b3e827c8 100644
--- a/dll/win32/shell32/lang/he-IL.rc
+++ b/dll/win32/shell32/lang/he-IL.rc
@@ -103,7 +103,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "בחירת תיקיה"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc
index d3cac589e6e..79ee61403d2 100644
--- a/dll/win32/shell32/lang/hi-IN.rc
+++ b/dll/win32/shell32/lang/hi-IN.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "फोल्डर खोंजे"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc
index 7c47db6fe45..dfd77d701be 100644
--- a/dll/win32/shell32/lang/hu-HU.rc
+++ b/dll/win32/shell32/lang/hu-HU.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Mappák böngészése"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc
index d48846edb55..d8506fbe52c 100644
--- a/dll/win32/shell32/lang/id-ID.rc
+++ b/dll/win32/shell32/lang/id-ID.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Jelajah Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc
index 8572685eda1..3a537c8a81d 100644
--- a/dll/win32/shell32/lang/it-IT.rc
+++ b/dll/win32/shell32/lang/it-IT.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Selezione cartella"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc
index d1c420ecf1a..a0ca7140350 100644
--- a/dll/win32/shell32/lang/ja-JP.rc
+++ b/dll/win32/shell32/lang/ja-JP.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "フォルダの参照"
FONT 9, "MS UI Gothic"
BEGIN
diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc
index 0c0fd22d783..2fc91428a2d 100644
--- a/dll/win32/shell32/lang/ko-KR.rc
+++ b/dll/win32/shell32/lang/ko-KR.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 9, "굴림"
BEGIN
diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc
index 0871a744914..9e1434b5f06 100644
--- a/dll/win32/shell32/lang/nl-NL.rc
+++ b/dll/win32/shell32/lang/nl-NL.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc
index 1b159361977..07dd8b29350 100644
--- a/dll/win32/shell32/lang/no-NO.rc
+++ b/dll/win32/shell32/lang/no-NO.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Bla etter mappe"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc
index beb02fd2ba6..46403617508 100644
--- a/dll/win32/shell32/lang/pl-PL.rc
+++ b/dll/win32/shell32/lang/pl-PL.rc
@@ -107,7 +107,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Wybierz katalog"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc
index f9d40a365da..36af8175910 100644
--- a/dll/win32/shell32/lang/pt-BR.rc
+++ b/dll/win32/shell32/lang/pt-BR.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Procurar por Pasta"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc
index 82ca880f830..a7940d3176a 100644
--- a/dll/win32/shell32/lang/pt-PT.rc
+++ b/dll/win32/shell32/lang/pt-PT.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Procurar pastas"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc
index bad12b2d015..3b3e965ffce 100644
--- a/dll/win32/shell32/lang/ro-RO.rc
+++ b/dll/win32/shell32/lang/ro-RO.rc
@@ -103,7 +103,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Specificare dosar"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc
index 0b73dc46b94..2983cf2e9d3 100644
--- a/dll/win32/shell32/lang/ru-RU.rc
+++ b/dll/win32/shell32/lang/ru-RU.rc
@@ -108,7 +108,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Обзор"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc
index b7c2c68873e..02ec1c7f2d4 100644
--- a/dll/win32/shell32/lang/sk-SK.rc
+++ b/dll/win32/shell32/lang/sk-SK.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc
index 25bb2407df3..0e7e5215a94 100644
--- a/dll/win32/shell32/lang/sl-SI.rc
+++ b/dll/win32/shell32/lang/sl-SI.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Browse for Folder"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc
index f555196609d..22f4fd02397 100644
--- a/dll/win32/shell32/lang/sq-AL.rc
+++ b/dll/win32/shell32/lang/sq-AL.rc
@@ -105,7 +105,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Shfleto për Dosje"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc
index 89ece721224..e4c7d0192ea 100644
--- a/dll/win32/shell32/lang/sv-SE.rc
+++ b/dll/win32/shell32/lang/sv-SE.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Bläddra efter mapp"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc
index 8ba5645ac0f..cf7bb2e7111 100644
--- a/dll/win32/shell32/lang/tr-TR.rc
+++ b/dll/win32/shell32/lang/tr-TR.rc
@@ -103,7 +103,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Dizin İçin Göz At"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc
index b8c7c952a33..e1ff4ace012 100644
--- a/dll/win32/shell32/lang/uk-UA.rc
+++ b/dll/win32/shell32/lang/uk-UA.rc
@@ -101,7 +101,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "Огляд папок"
FONT 8, "MS Shell Dlg"
BEGIN
diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc
index b93b3a389ab..da607ce1762 100644
--- a/dll/win32/shell32/lang/zh-CN.rc
+++ b/dll/win32/shell32/lang/zh-CN.rc
@@ -111,7 +111,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "浏览文件夹"
FONT 9, "宋体"
BEGIN
diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc
index dbe437c0ea9..33dcb7ff313 100644
--- a/dll/win32/shell32/lang/zh-TW.rc
+++ b/dll/win32/shell32/lang/zh-TW.rc
@@ -111,7 +111,7 @@ BEGIN
END
IDD_BROWSE_FOR_FOLDER_NEW DIALOGEX 15, 40, 218, 196
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX
CAPTION "瀏覽資料夾"
FONT 9, "新細明體"
BEGIN
diff --git a/dll/win32/shell32/wine/brsfolder.c b/dll/win32/shell32/wine/brsfolder.c
index 1b11b812981..74c0f2f42b6 100644
--- a/dll/win32/shell32/wine/brsfolder.c
+++ b/dll/win32/shell32/wine/brsfolder.c
@@ -40,18 +40,21 @@
#include "shresdef.h"
#ifdef __REACTOS__
#include <shlwapi.h>
+ #include "layout.h" /* Resizable window */
#endif
WINE_DEFAULT_DEBUG_CHANNEL(shell);
#define SHV_CHANGE_NOTIFY (WM_USER + 0x1111)
+#ifndef __REACTOS__ /* Defined in "layout.h" */
/* original margins and control size */
typedef struct tagLAYOUT_DATA
{
LONG left, width, right;
LONG top, height, bottom;
} LAYOUT_DATA;
+#endif
typedef struct tagbrowse_info
{
@@ -72,17 +75,21 @@ typedef struct tagTV_ITEMDATA
IEnumIDList* pEnumIL; /* Children iterator */
} TV_ITEMDATA, *LPTV_ITEMDATA;
+#ifndef __REACTOS__ /* Defined in "layout.h" */
typedef struct tagLAYOUT_INFO
{
int iItemId; /* control id */
DWORD dwAnchor; /* BF_* flags specifying which margins should remain constant
*/
} LAYOUT_INFO;
+#endif
static const LAYOUT_INFO g_layout_info[] =
{
{IDC_BROWSE_FOR_FOLDER_TITLE, BF_TOP|BF_LEFT|BF_RIGHT},
{IDC_BROWSE_FOR_FOLDER_STATUS, BF_TOP|BF_LEFT|BF_RIGHT},
+#ifndef __REACTOS__ /* Duplicated */
{IDC_BROWSE_FOR_FOLDER_FOLDER, BF_TOP|BF_LEFT|BF_RIGHT},
+#endif
{IDC_BROWSE_FOR_FOLDER_TREEVIEW, BF_TOP|BF_BOTTOM|BF_LEFT|BF_RIGHT},
{IDC_BROWSE_FOR_FOLDER_FOLDER, BF_BOTTOM|BF_LEFT},
{IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, BF_BOTTOM|BF_LEFT|BF_RIGHT},
@@ -125,6 +132,7 @@ static void browsefolder_callback( LPBROWSEINFOW lpBrowseInfo, HWND
hWnd,
lpBrowseInfo->lpfn( hWnd, msg, param, lpBrowseInfo->lParam );
}
+#ifndef __REACTOS__ /* Defined in "layout.h" */
static LAYOUT_DATA *LayoutInit(HWND hwnd, const LAYOUT_INFO *layout_info, int
layout_count)
{
LAYOUT_DATA *data;
@@ -185,6 +193,7 @@ static void LayoutUpdate(HWND hwnd, LAYOUT_DATA *data, const
LAYOUT_INFO *layout
SetWindowPos(hItem, NULL, r.left, r.top, r.right - r.left, r.bottom - r.top,
SWP_NOZORDER);
}
}
+#endif
/******************************************************************************
@@ -1127,6 +1136,7 @@ static BOOL BrsFolder_OnSetSelectionA(browse_info *info, LPVOID
selection, BOOL
return result;
}
+#ifndef __REACTOS__ /* This is a buggy way (resize on title bar) */
static LRESULT BrsFolder_OnWindowPosChanging(browse_info *info, WINDOWPOS *pos)
{
if ((info->lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE) &&
!(pos->flags & SWP_NOSIZE))
@@ -1138,12 +1148,17 @@ static LRESULT BrsFolder_OnWindowPosChanging(browse_info *info,
WINDOWPOS *pos)
}
return 0;
}
+#endif
static INT BrsFolder_OnDestroy(browse_info *info)
{
if (info->layout)
{
+#ifdef __REACTOS__
+ LayoutDestroy(info->layout);
+#else
SHFree(info->layout);
+#endif
info->layout = NULL;
}
@@ -1226,8 +1241,15 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg,
WPARAM wParam,
case WM_COMMAND:
return BrsFolder_OnCommand( info, wParam );
+#ifdef __REACTOS__
+ case WM_GETMINMAXINFO:
+ ((LPMINMAXINFO)lParam)->ptMinTrackSize.x = info->szMin.cx;
+ ((LPMINMAXINFO)lParam)->ptMinTrackSize.y = info->szMin.cy;
+ return 0;
+#else /* This is a buggy way (resize on title bar) */
case WM_WINDOWPOSCHANGING:
return BrsFolder_OnWindowPosChanging( info, (WINDOWPOS *)lParam);
+#endif
case WM_SIZE:
if (info->layout) /* new style dialogs */
diff --git a/sdk/include/reactos/layout.h b/sdk/include/reactos/layout.h
new file mode 100644
index 00000000000..4e1bebe02be
--- /dev/null
+++ b/sdk/include/reactos/layout.h
@@ -0,0 +1,232 @@
+/*
+ * PROJECT: ReactOS headers
+ * LICENSE: LGPL-2.0-or-later (
https://spdx.org/licenses/LGPL-2.0-or-later)
+ * PURPOSE: The layout engine of resizable dialog boxes / windows
+ * COPYRIGHT: Copyright 2020 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com)
+ */
+#pragma once
+#include <assert.h>
+
+typedef struct LAYOUT_INFO {
+ UINT m_nCtrlID;
+ UINT m_uEdges; /* BF_* flags */
+ HWND m_hwndCtrl;
+ SIZE m_margin1;
+ SIZE m_margin2;
+} LAYOUT_INFO;
+
+typedef struct LAYOUT_DATA {
+ HWND m_hwndParent;
+ HWND m_hwndGrip;
+ LAYOUT_INFO *m_pLayouts;
+ UINT m_cLayouts;
+} LAYOUT_DATA;
+
+static __inline void
+_layout_ModifySystemMenu(LAYOUT_DATA *pData, BOOL bEnableResize)
+{
+ if (bEnableResize)
+ {
+ GetSystemMenu(pData->m_hwndParent, TRUE); /* revert */
+ }
+ else
+ {
+ HMENU hSysMenu = GetSystemMenu(pData->m_hwndParent, FALSE);
+ RemoveMenu(hSysMenu, SC_MAXIMIZE, MF_BYCOMMAND);
+ RemoveMenu(hSysMenu, SC_SIZE, MF_BYCOMMAND);
+ RemoveMenu(hSysMenu, SC_RESTORE, MF_BYCOMMAND);
+ }
+}
+
+static __inline HDWP
+_layout_MoveGrip(LAYOUT_DATA *pData, HDWP hDwp OPTIONAL)
+{
+ SIZE size = { GetSystemMetrics(SM_CXVSCROLL), GetSystemMetrics(SM_CYHSCROLL) };
+ const UINT uFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER;
+ RECT rcClient;
+ GetClientRect(pData->m_hwndParent, &rcClient);
+
+ if (hDwp)
+ {
+ hDwp = DeferWindowPos(hDwp, pData->m_hwndGrip, NULL,
+ rcClient.right - size.cx, rcClient.bottom - size.cy,
+ size.cx, size.cy, uFlags);
+ }
+ else
+ {
+ SetWindowPos(pData->m_hwndGrip, NULL,
+ rcClient.right - size.cx, rcClient.bottom - size.cy,
+ size.cx, size.cy, uFlags);
+ }
+ return hDwp;
+}
+
+static __inline void
+_layout_ShowGrip(LAYOUT_DATA *pData, BOOL bShow)
+{
+ if (!bShow)
+ {
+ ShowWindow(pData->m_hwndGrip, SW_HIDE);
+ return;
+ }
+
+ if (pData->m_hwndGrip == NULL)
+ {
+ DWORD style = WS_CHILD | WS_CLIPSIBLINGS | SBS_SIZEGRIP;
+ pData->m_hwndGrip = CreateWindowExW(0, L"SCROLLBAR", NULL, style,
+ 0, 0, 0, 0, pData->m_hwndParent,
+ NULL, GetModuleHandleW(NULL), NULL);
+ }
+ _layout_MoveGrip(pData, NULL);
+ ShowWindow(pData->m_hwndGrip, SW_SHOWNOACTIVATE);
+}
+
+static __inline void
+_layout_GetPercents(LPRECT prcPercents, UINT uEdges)
+{
+ prcPercents->left = (uEdges & BF_LEFT) ? 0 : 100;
+ prcPercents->right = (uEdges & BF_RIGHT) ? 100 : 0;
+ prcPercents->top = (uEdges & BF_TOP) ? 0 : 100;
+ prcPercents->bottom = (uEdges & BF_BOTTOM) ? 100 : 0;
+}
+
+static __inline HDWP
+_layout_DoMoveItem(LAYOUT_DATA *pData, HDWP hDwp, const LAYOUT_INFO *pLayout,
+ const RECT *rcClient)
+{
+ RECT rcChild, NewRect, rcPercents;
+ LONG nWidth, nHeight;
+
+ if (!GetWindowRect(pLayout->m_hwndCtrl, &rcChild))
+ return hDwp;
+ MapWindowPoints(NULL, pData->m_hwndParent, (LPPOINT)&rcChild, 2);
+
+ nWidth = rcClient->right - rcClient->left;
+ nHeight = rcClient->bottom - rcClient->top;
+
+ _layout_GetPercents(&rcPercents, pLayout->m_uEdges);
+ NewRect.left = pLayout->m_margin1.cx + nWidth * rcPercents.left / 100;
+ NewRect.top = pLayout->m_margin1.cy + nHeight * rcPercents.top / 100;
+ NewRect.right = pLayout->m_margin2.cx + nWidth * rcPercents.right / 100;
+ NewRect.bottom = pLayout->m_margin2.cy + nHeight * rcPercents.bottom / 100;
+
+ if (!EqualRect(&NewRect, &rcChild))
+ {
+ hDwp = DeferWindowPos(hDwp, pLayout->m_hwndCtrl, NULL, NewRect.left,
NewRect.top,
+ NewRect.right - NewRect.left, NewRect.bottom -
NewRect.top,
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREPOSITION);
+ }
+ return hDwp;
+}
+
+static __inline void
+_layout_ArrangeLayout(LAYOUT_DATA *pData)
+{
+ RECT rcClient;
+ UINT iItem;
+ HDWP hDwp = BeginDeferWindowPos(pData->m_cLayouts + 1);
+ if (hDwp == NULL)
+ return;
+
+ GetClientRect(pData->m_hwndParent, &rcClient);
+
+ for (iItem = 0; iItem < pData->m_cLayouts; ++iItem)
+ hDwp = _layout_DoMoveItem(pData, hDwp, &pData->m_pLayouts[iItem],
&rcClient);
+
+ hDwp = _layout_MoveGrip(pData, hDwp);
+ EndDeferWindowPos(hDwp);
+}
+
+static __inline void
+_layout_InitLayouts(LAYOUT_DATA *pData)
+{
+ RECT rcClient, rcChild, rcPercents;
+ LONG nWidth, nHeight;
+ UINT iItem;
+
+ GetClientRect(pData->m_hwndParent, &rcClient);
+ nWidth = rcClient.right - rcClient.left;
+ nHeight = rcClient.bottom - rcClient.top;
+
+ for (iItem = 0; iItem < pData->m_cLayouts; ++iItem)
+ {
+ LAYOUT_INFO *pInfo = &pData->m_pLayouts[iItem];
+ if (pInfo->m_hwndCtrl == NULL)
+ {
+ pInfo->m_hwndCtrl = GetDlgItem(pData->m_hwndParent,
pInfo->m_nCtrlID);
+ if (pInfo->m_hwndCtrl == NULL)
+ continue;
+ }
+
+ GetWindowRect(pInfo->m_hwndCtrl, &rcChild);
+ MapWindowPoints(NULL, pData->m_hwndParent, (LPPOINT)&rcChild, 2);
+
+ _layout_GetPercents(&rcPercents, pInfo->m_uEdges);
+ pInfo->m_margin1.cx = rcChild.left - nWidth * rcPercents.left / 100;
+ pInfo->m_margin1.cy = rcChild.top - nHeight * rcPercents.top / 100;
+ pInfo->m_margin2.cx = rcChild.right - nWidth * rcPercents.right / 100;
+ pInfo->m_margin2.cy = rcChild.bottom - nHeight * rcPercents.bottom / 100;
+ }
+}
+
+/* NOTE: Please call LayoutUpdate on parent's WM_SIZE. */
+static __inline void
+LayoutUpdate(HWND ignored1, LAYOUT_DATA *pData, LPCVOID ignored2, UINT ignored3)
+{
+ UNREFERENCED_PARAMETER(ignored1);
+ UNREFERENCED_PARAMETER(ignored2);
+ UNREFERENCED_PARAMETER(ignored3);
+ if (pData == NULL)
+ return;
+ assert(IsWindow(pData->m_hwndParent));
+ _layout_ArrangeLayout(pData);
+}
+
+static __inline void
+LayoutEnableResize(LAYOUT_DATA *pData, BOOL bEnable)
+{
+ _layout_ShowGrip(pData, bEnable);
+ _layout_ModifySystemMenu(pData, bEnable);
+}
+
+static __inline LAYOUT_DATA *
+LayoutInit(HWND hwndParent, const LAYOUT_INFO *pLayouts, UINT cLayouts)
+{
+ SIZE_T cb;
+ LAYOUT_DATA *pData = (LAYOUT_DATA *)SHAlloc(sizeof(LAYOUT_DATA));
+ if (pData == NULL)
+ {
+ assert(0);
+ return NULL;
+ }
+
+ cb = cLayouts * sizeof(LAYOUT_INFO);
+ pData->m_cLayouts = cLayouts;
+ pData->m_pLayouts = (LAYOUT_INFO *)SHAlloc(cb);
+ if (pData->m_pLayouts == NULL)
+ {
+ assert(0);
+ SHFree(pData);
+ return NULL;
+ }
+ memcpy(pData->m_pLayouts, pLayouts, cb);
+
+ /* NOTE: The parent window must have initially WS_SIZEBOX style. */
+ assert(IsWindow(hwndParent));
+ assert(GetWindowLongPtrW(hwndParent, GWL_STYLE) & WS_SIZEBOX);
+
+ pData->m_hwndParent = hwndParent;
+ pData->m_hwndGrip = NULL;
+ LayoutEnableResize(pData, TRUE);
+ _layout_InitLayouts(pData);
+ return pData;
+}
+
+static __inline void
+LayoutDestroy(LAYOUT_DATA *pData)
+{
+ if (!pData)
+ return;
+ SHFree(pData->m_pLayouts);
+ SHFree(pData);
+}