https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2edcb58e6550fd6283cf3…
commit 2edcb58e6550fd6283cf3a7d332ee61849704f3d
Author: Vladimir Barinov <source.hl2(a)yandex.ru>
AuthorDate: Sat May 9 15:54:52 2020 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Tue Aug 25 22:52:17 2020 +0300
[MSGINA][SYSSETUP] Implement Friendly UI shutdown dialog (#2762)
Can be activated by installing ReactOS as a Workstation. CORE-12805
References:
-
https://www.remkoweijnen.nl/blog/2009/01/16/windows-xp-x64-terminal-server-…
-
https://www.remkoweijnen.nl/blog/2011/01/30/using-fast-user-switching-on-do…
Co-authored-by: Stanislav Motylkov <x86corez(a)gmail.com>
---
boot/bootdata/hivesft.inf | 1 +
dll/win32/msgina/lang/bg-BG.rc | 11 ++-
dll/win32/msgina/lang/cs-CZ.rc | 11 ++-
dll/win32/msgina/lang/de-DE.rc | 11 ++-
dll/win32/msgina/lang/en-US.rc | 11 ++-
dll/win32/msgina/lang/es-ES.rc | 11 ++-
dll/win32/msgina/lang/fr-FR.rc | 11 ++-
dll/win32/msgina/lang/he-IL.rc | 11 ++-
dll/win32/msgina/lang/hu-HU.rc | 11 ++-
dll/win32/msgina/lang/id-ID.rc | 11 ++-
dll/win32/msgina/lang/it-IT.rc | 11 ++-
dll/win32/msgina/lang/ja-JP.rc | 13 ++-
dll/win32/msgina/lang/no-NO.rc | 11 ++-
dll/win32/msgina/lang/pl-PL.rc | 11 ++-
dll/win32/msgina/lang/pt-PT.rc | 11 ++-
dll/win32/msgina/lang/ro-RO.rc | 11 ++-
dll/win32/msgina/lang/ru-RU.rc | 11 ++-
dll/win32/msgina/lang/sk-SK.rc | 11 ++-
dll/win32/msgina/lang/sq-AL.rc | 11 ++-
dll/win32/msgina/lang/tr-TR.rc | 11 ++-
dll/win32/msgina/lang/uk-UA.rc | 11 ++-
dll/win32/msgina/lang/zh-CN.rc | 11 ++-
dll/win32/msgina/lang/zh-TW.rc | 11 ++-
dll/win32/msgina/msgina.spec | 2 +-
dll/win32/msgina/resource.h | 4 +
dll/win32/msgina/shutdown.c | 178 ++++++++++++++++++++++++++++++++++++++++-
dll/win32/syssetup/wizard.c | 26 +++++-
27 files changed, 383 insertions(+), 72 deletions(-)
diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf
index 9f2511d0e7c..0983a45edcb 100644
--- a/boot/bootdata/hivesft.inf
+++ b/boot/bootdata/hivesft.inf
@@ -1484,6 +1484,7 @@ HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","ConsoleShell",0x00
HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe"
HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","Userinit",0x00020000,"%SystemRoot%\system32\userinit.exe"
HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,"1"
+HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","LogonType",0x00010001,0
HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","DefaultDomainName",0x00000000,""
HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,""
HKLM,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,""
diff --git a/dll/win32/msgina/lang/bg-BG.rc b/dll/win32/msgina/lang/bg-BG.rc
index 9231ef9e57b..128cb2a2d16 100644
--- a/dll/win32/msgina/lang/bg-BG.rc
+++ b/dll/win32/msgina/lang/bg-BG.rc
@@ -172,12 +172,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Изключване на РеактОС"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Slee&p", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Изключване", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Отказ", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/cs-CZ.rc b/dll/win32/msgina/lang/cs-CZ.rc
index f4e75e6c3a8..4fc75643d3b 100644
--- a/dll/win32/msgina/lang/cs-CZ.rc
+++ b/dll/win32/msgina/lang/cs-CZ.rc
@@ -177,12 +177,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Vypnout ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Uspat", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Vypnout", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restartovat", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Storno", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/de-DE.rc b/dll/win32/msgina/lang/de-DE.rc
index a727d6dbf20..f2e65c2eeca 100644
--- a/dll/win32/msgina/lang/de-DE.rc
+++ b/dll/win32/msgina/lang/de-DE.rc
@@ -172,12 +172,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "ReactOS herunterfahren"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Schlafmodus", IDC_BUTTON_SLEEP, 37, 63, 55, 31,
BS_MULTILINE | WS_GROUP
+ PUSHBUTTON "&Herunterfahren", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Neustart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Abbrechen", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/en-US.rc b/dll/win32/msgina/lang/en-US.rc
index 8ef6da8293b..e172e228406 100644
--- a/dll/win32/msgina/lang/en-US.rc
+++ b/dll/win32/msgina/lang/en-US.rc
@@ -173,12 +173,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Shut Down ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Slee&p", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Shut Down", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Cancel", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/es-ES.rc b/dll/win32/msgina/lang/es-ES.rc
index ed688a96651..eed6f1b5776 100644
--- a/dll/win32/msgina/lang/es-ES.rc
+++ b/dll/win32/msgina/lang/es-ES.rc
@@ -181,12 +181,17 @@ BEGIN
DEFPUSHBUTTON "Aceptar", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Apagar ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Suspender", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE
| WS_GROUP
+ PUSHBUTTON "&Apagar", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Reiniciar", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Cancelar", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/fr-FR.rc b/dll/win32/msgina/lang/fr-FR.rc
index b7251e08e34..3fbf1c3eeff 100644
--- a/dll/win32/msgina/lang/fr-FR.rc
+++ b/dll/win32/msgina/lang/fr-FR.rc
@@ -172,12 +172,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Arrêt de ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Mettre en &veille", IDC_BUTTON_SLEEP, 37, 63, 55, 31,
BS_MULTILINE | WS_GROUP
+ PUSHBUTTON "Éteindr&e", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Redémarrer", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Annuler", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/he-IL.rc b/dll/win32/msgina/lang/he-IL.rc
index 17f40ef209a..d75af6a5362 100644
--- a/dll/win32/msgina/lang/he-IL.rc
+++ b/dll/win32/msgina/lang/he-IL.rc
@@ -172,12 +172,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Shut Down ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Slee&p", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Shut Down", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Cancel", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/hu-HU.rc b/dll/win32/msgina/lang/hu-HU.rc
index 68db4db0035..269bb6daffc 100644
--- a/dll/win32/msgina/lang/hu-HU.rc
+++ b/dll/win32/msgina/lang/hu-HU.rc
@@ -173,12 +173,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP stílusú leállítási párbeszédpanel."
+CAPTION "ReactOS leállítása"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Alvás", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Leállítás", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Új&raindítás", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Mégse", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/id-ID.rc b/dll/win32/msgina/lang/id-ID.rc
index 979dd20b3ee..5270a07b668 100644
--- a/dll/win32/msgina/lang/id-ID.rc
+++ b/dll/win32/msgina/lang/id-ID.rc
@@ -172,12 +172,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Nonaktifkan ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Tidur", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Nonaktifkan", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Mulai &Ulang", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Batal", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/it-IT.rc b/dll/win32/msgina/lang/it-IT.rc
index 9b14b8aa3b8..58ccf239284 100644
--- a/dll/win32/msgina/lang/it-IT.rc
+++ b/dll/win32/msgina/lang/it-IT.rc
@@ -181,12 +181,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Spegnimento di ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Sos&pendi", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE
| WS_GROUP
+ PUSHBUTTON "&Spegni", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Riavvia", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Annulla", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/ja-JP.rc b/dll/win32/msgina/lang/ja-JP.rc
index 00ecbb22d08..4a99eed685f 100644
--- a/dll/win32/msgina/lang/ja-JP.rc
+++ b/dll/win32/msgina/lang/ja-JP.rc
@@ -177,12 +177,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
-FONT 9,"MS UI Gothic", 400, 0, 1
+CAPTION "ReactOS のシャットダウン"
+FONT 9, "MS UI Gothic"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "スリープ(&P)", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "シャットダウン(&S)", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "再起動(&R)", IDC_BUTTON_REBOOT, 182, 63, 55, 31, BS_MULTILINE
+ PUSHBUTTON "キャンセル", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/no-NO.rc b/dll/win32/msgina/lang/no-NO.rc
index 34a6d3b1d44..21dfd91e1c3 100644
--- a/dll/win32/msgina/lang/no-NO.rc
+++ b/dll/win32/msgina/lang/no-NO.rc
@@ -172,12 +172,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Slå av ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Slee&p", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Shut Down", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Avbryt", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/pl-PL.rc b/dll/win32/msgina/lang/pl-PL.rc
index 48d7c73f121..8520df64ecd 100644
--- a/dll/win32/msgina/lang/pl-PL.rc
+++ b/dll/win32/msgina/lang/pl-PL.rc
@@ -183,12 +183,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Okno zamykania w stylu motywu Luna"
+CAPTION "Zamknij ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Uśpij", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Wyłącz", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Uruchom &ponownie", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Anuluj", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/pt-PT.rc b/dll/win32/msgina/lang/pt-PT.rc
index 15749ae53d1..389b3b5c1b2 100644
--- a/dll/win32/msgina/lang/pt-PT.rc
+++ b/dll/win32/msgina/lang/pt-PT.rc
@@ -173,12 +173,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Estilo-Luna-XP- Dialogo 'Desligar'"
+CAPTION "Desligar o computador"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Suspender", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE
| WS_GROUP
+ PUSHBUTTON "&Desligar", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Reiniciar", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Cancelar", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/ro-RO.rc b/dll/win32/msgina/lang/ro-RO.rc
index a2309de539f..20b0e90c9a6 100644
--- a/dll/win32/msgina/lang/ro-RO.rc
+++ b/dll/win32/msgina/lang/ro-RO.rc
@@ -181,12 +181,17 @@ BEGIN
DEFPUSHBUTTON "Î&nchide", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Închidere ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "Con&firmă", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Stare de veghe", IDC_BUTTON_SLEEP, 37, 63, 55, 31,
BS_MULTILINE | WS_GROUP
+ PUSHBUTTON "Închi&dere", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Repornire", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "A&nulează", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/ru-RU.rc b/dll/win32/msgina/lang/ru-RU.rc
index 1359dad3d67..068b508087b 100644
--- a/dll/win32/msgina/lang/ru-RU.rc
+++ b/dll/win32/msgina/lang/ru-RU.rc
@@ -174,12 +174,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Завершение работы ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Спящий режим", IDC_BUTTON_SLEEP, 37, 63, 55, 31,
BS_MULTILINE | WS_GROUP
+ PUSHBUTTON "&Выключить", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Перезапустить", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Отмена", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/sk-SK.rc b/dll/win32/msgina/lang/sk-SK.rc
index 07c0c6093fc..d4a28366cbe 100644
--- a/dll/win32/msgina/lang/sk-SK.rc
+++ b/dll/win32/msgina/lang/sk-SK.rc
@@ -177,12 +177,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Vypnutie systému ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Slee&p", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Shut Down", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Zrušiť", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/sq-AL.rc b/dll/win32/msgina/lang/sq-AL.rc
index 1c763f30435..5deec75ec1e 100644
--- a/dll/win32/msgina/lang/sq-AL.rc
+++ b/dll/win32/msgina/lang/sq-AL.rc
@@ -176,12 +176,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Shut Down ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "Slee&p", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Shut Down", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Restart", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Anulo", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/tr-TR.rc b/dll/win32/msgina/lang/tr-TR.rc
index 208462e9b5c..ffc374b021f 100644
--- a/dll/win32/msgina/lang/tr-TR.rc
+++ b/dll/win32/msgina/lang/tr-TR.rc
@@ -174,12 +174,17 @@ BEGIN
DEFPUSHBUTTON "Tamam", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna XP Biçiminde Bilgisayarı Kapat İletişim Kutusu"
+CAPTION "Bilgisayarı Kapat"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "Tamam", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Uykuya Geçir", IDC_BUTTON_SLEEP, 37, 63, 55, 31,
BS_MULTILINE | WS_GROUP
+ PUSHBUTTON "Bilgi&sayarı", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Yeniden &Başlat", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "İptal", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/uk-UA.rc b/dll/win32/msgina/lang/uk-UA.rc
index 3636dfad445..3068431e425 100644
--- a/dll/win32/msgina/lang/uk-UA.rc
+++ b/dll/win32/msgina/lang/uk-UA.rc
@@ -180,12 +180,17 @@ BEGIN
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "Завершення роботи ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "&Сон", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "&Вимкнути", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "&Перезавантажити", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "Скасувати", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/zh-CN.rc b/dll/win32/msgina/lang/zh-CN.rc
index 373d417b1e5..85649ded9c1 100644
--- a/dll/win32/msgina/lang/zh-CN.rc
+++ b/dll/win32/msgina/lang/zh-CN.rc
@@ -175,12 +175,17 @@ BEGIN
DEFPUSHBUTTON "确定", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "关闭 ReactOS"
FONT 9, "宋体"
BEGIN
- DEFPUSHBUTTON "确定", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "睡眠状态(&P)", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "关闭(&S)", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "重新启动(&R)", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "取消", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/lang/zh-TW.rc b/dll/win32/msgina/lang/zh-TW.rc
index d833852e1ce..46a613cbc66 100644
--- a/dll/win32/msgina/lang/zh-TW.rc
+++ b/dll/win32/msgina/lang/zh-TW.rc
@@ -174,12 +174,17 @@ BEGIN
DEFPUSHBUTTON "確定", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 135
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Luna-XP-style Shut Down dialog"
+CAPTION "關閉 ReactOS"
FONT 9, "新細明體"
BEGIN
- DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ CONTROL IDI_BAR, IDC_BAR, "Static", SS_BITMAP, 0, 44, 275, 4
+ PUSHBUTTON "睡眠狀態(&P)", IDC_BUTTON_SLEEP, 37, 63, 55, 31, BS_MULTILINE |
WS_GROUP
+ PUSHBUTTON "關閉(&S)", IDC_BUTTON_SHUTDOWN, 109, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "重新開機(&R)", IDC_BUTTON_REBOOT, 182, 63, 55, 31,
BS_MULTILINE
+ PUSHBUTTON "取消", IDCANCEL, 205, 111, 55, 14, WS_GROUP
END
STRINGTABLE
diff --git a/dll/win32/msgina/msgina.spec b/dll/win32/msgina/msgina.spec
index 92a74fe8649..1d235ae5f62 100644
--- a/dll/win32/msgina/msgina.spec
+++ b/dll/win32/msgina/msgina.spec
@@ -1,6 +1,6 @@
1 stub -noname ShellGetUserList ; (long long long)
2 stub -noname ShellStatusHostEnd ; (long)
-3 stdcall -stub -noname ShellIsFriendlyUIActive()
+3 stdcall -noname ShellIsFriendlyUIActive()
4 stub -noname ShellIsSuspendAllowed ; ()
5 stub -noname ShellIsRemoteConnectionsEnabled ; ()
6 stub -noname ShellEnableFriendlyUI ; (long)
diff --git a/dll/win32/msgina/resource.h b/dll/win32/msgina/resource.h
index c7de8014b9b..52ddf7ba6ff 100644
--- a/dll/win32/msgina/resource.h
+++ b/dll/win32/msgina/resource.h
@@ -51,6 +51,10 @@
#define IDC_REASON_DESCRIPTION 2005
#define IDC_REASON_COMMENT 2006
+#define IDC_BUTTON_SLEEP 1901
+#define IDC_BUTTON_SHUTDOWN 1902
+#define IDC_BUTTON_REBOOT 1903
+
#define IDD_LEGALNOTICE 2100
#define IDC_LEGALNOTICE_TEXT 2101
diff --git a/dll/win32/msgina/shutdown.c b/dll/win32/msgina/shutdown.c
index 658e21c7f5c..88f1036d5dd 100644
--- a/dll/win32/msgina/shutdown.c
+++ b/dll/win32/msgina/shutdown.c
@@ -28,6 +28,7 @@ typedef struct _SHUTDOWN_DLG_CONTEXT
DWORD ShutdownOptions;
BOOL bCloseDlg;
BOOL bReasonUI;
+ BOOL bFriendlyUI;
} SHUTDOWN_DLG_CONTEXT, *PSHUTDOWN_DLG_CONTEXT;
@@ -91,6 +92,148 @@ GetShutdownReasonUI(VOID)
// return (VersionInfo.wProductType == VER_NT_WORKSTATION) ? FALSE : TRUE;
}
+static
+BOOL
+IsFriendlyUIActive(VOID)
+{
+ DWORD dwType, dwValue, dwSize;
+ HKEY hKey;
+ LONG lRet;
+
+ /* Check product version number first */
+ lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SYSTEM\\CurrentControlSet\\Control\\Windows",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ if (lRet != ERROR_SUCCESS)
+ return FALSE;
+
+ dwValue = 0;
+ dwSize = sizeof(dwValue);
+ lRet = RegQueryValueExW(hKey,
+ L"CSDVersion",
+ NULL,
+ &dwType,
+ (LPBYTE)&dwValue,
+ &dwSize);
+ RegCloseKey(hKey);
+
+ if (lRet != ERROR_SUCCESS || dwType != REG_DWORD || dwValue != 0x300)
+ {
+ /* Allow Friendly UI only on Workstation */
+ return FALSE;
+ }
+
+ /* Check LogonType value */
+ lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Winlogon",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ if (lRet != ERROR_SUCCESS)
+ return FALSE;
+
+ dwValue = 0;
+ dwSize = sizeof(dwValue);
+ lRet = RegQueryValueExW(hKey,
+ L"LogonType",
+ NULL,
+ &dwType,
+ (LPBYTE)&dwValue,
+ &dwSize);
+ RegCloseKey(hKey);
+
+ if (lRet != ERROR_SUCCESS || dwType != REG_DWORD)
+ return FALSE;
+
+ return (dwValue != 0);
+}
+
+static
+BOOL
+IsDomainMember(VOID)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+static
+BOOL
+IsNetwareActive(VOID)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+static
+BOOL
+ForceFriendlyUI(VOID)
+{
+ DWORD dwType, dwValue, dwSize;
+ HKEY hKey;
+ LONG lRet;
+
+ lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ if (lRet == ERROR_SUCCESS)
+ {
+ dwValue = 0;
+ dwSize = sizeof(dwValue);
+ lRet = RegQueryValueExW(hKey,
+ L"ForceFriendlyUI",
+ NULL,
+ &dwType,
+ (LPBYTE)&dwValue,
+ &dwSize);
+ RegCloseKey(hKey);
+
+ if (lRet == ERROR_SUCCESS && dwType == REG_DWORD)
+ return (dwValue != 0);
+ }
+
+ lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Winlogon",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ if (lRet == ERROR_SUCCESS)
+ {
+ dwValue = 0;
+ dwSize = sizeof(dwValue);
+ lRet = RegQueryValueExW(hKey,
+ L"ForceFriendlyUI",
+ NULL,
+ &dwType,
+ (LPBYTE)&dwValue,
+ &dwSize);
+
+ RegCloseKey(hKey);
+
+ if (lRet == ERROR_SUCCESS && dwType == REG_DWORD)
+ return (dwValue != 0);
+ }
+
+ return FALSE;
+}
+
+BOOL
+WINAPI
+ShellIsFriendlyUIActive(VOID)
+{
+ BOOL bActive;
+
+ bActive = IsFriendlyUIActive();
+
+ if ((IsDomainMember() || IsNetwareActive()) && !ForceFriendlyUI())
+ return FALSE;
+
+ return bActive;
+}
+
DWORD
GetDefaultShutdownSelState(VOID)
{
@@ -326,6 +469,10 @@ ShutdownOnInit(
if (idx != CB_ERR)
SendMessageW(hwndList, CB_SETITEMDATA, idx,
WLX_SAS_ACTION_SHUTDOWN_POWER_OFF);
}
+ else if (pContext->bFriendlyUI)
+ {
+ EnableWindow(GetDlgItem(hDlg, IDC_BUTTON_SHUTDOWN), FALSE);
+ }
/* Restart */
if (pContext->ShutdownOptions & WLX_SHUTDOWN_STATE_REBOOT)
@@ -335,6 +482,10 @@ ShutdownOnInit(
if (idx != CB_ERR)
SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_REBOOT);
}
+ else if (pContext->bFriendlyUI)
+ {
+ EnableWindow(GetDlgItem(hDlg, IDC_BUTTON_REBOOT), FALSE);
+ }
// if (pContext->ShutdownOptions & 0x08) {}
@@ -346,6 +497,10 @@ ShutdownOnInit(
if (idx != CB_ERR)
SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_SLEEP);
}
+ else if (pContext->bFriendlyUI)
+ {
+ EnableWindow(GetDlgItem(hDlg, IDC_BUTTON_SLEEP), FALSE);
+ }
// if (pContext->ShutdownOptions & 0x20) {}
@@ -467,6 +622,18 @@ ShutdownDialogProc(
case WM_COMMAND:
switch (LOWORD(wParam))
{
+ case IDC_BUTTON_SHUTDOWN:
+ ExitWindowsEx(EWX_SHUTDOWN, SHTDN_REASON_MAJOR_OTHER);
+ break;
+
+ case IDC_BUTTON_REBOOT:
+ ExitWindowsEx(EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER);
+ break;
+
+ case IDC_BUTTON_SLEEP:
+ SetSuspendState(TRUE, TRUE, TRUE);
+ break;
+
case IDOK:
ShutdownOnOk(hDlg, pContext->pgContext);
@@ -497,6 +664,7 @@ ShutdownDialog(
{
INT_PTR ret;
SHUTDOWN_DLG_CONTEXT Context;
+ DWORD ShutdownDialogId = IDD_SHUTDOWN;
#if 0
DWORD ShutdownOptions;
@@ -510,8 +678,9 @@ ShutdownDialog(
Context.ShutdownOptions = ShutdownOptions;
Context.bCloseDlg = FALSE;
Context.bReasonUI = GetShutdownReasonUI();
+ Context.bFriendlyUI = ShellIsFriendlyUIActive();
- if (pgContext->hWlx && pgContext->pWlxFuncs)
+ if (pgContext->hWlx && pgContext->pWlxFuncs &&
!Context.bFriendlyUI)
{
ret = pgContext->pWlxFuncs->WlxDialogBoxParam(pgContext->hWlx,
pgContext->hDllInstance,
@@ -522,8 +691,13 @@ ShutdownDialog(
}
else
{
+ if (Context.bFriendlyUI)
+ {
+ ShutdownDialogId = IDD_SHUTDOWN_FANCY;
+ }
+
ret = DialogBoxParamW(pgContext->hDllInstance,
- MAKEINTRESOURCEW(Context.bReasonUI ? IDD_SHUTDOWN_REASON :
IDD_SHUTDOWN),
+ MAKEINTRESOURCEW(Context.bReasonUI ? IDD_SHUTDOWN_REASON :
ShutdownDialogId),
hwndDlg,
ShutdownDialogProc,
(LPARAM)&Context);
diff --git a/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c
index ad2e9c71847..75913c67d69 100644
--- a/dll/win32/syssetup/wizard.c
+++ b/dll/win32/syssetup/wizard.c
@@ -394,6 +394,7 @@ AckPageDlgProc(HWND hwndDlg,
static const WCHAR s_szProductOptions[] =
L"SYSTEM\\CurrentControlSet\\Control\\ProductOptions";
static const WCHAR s_szRosVersion[] =
L"SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version";
static const WCHAR s_szControlWindows[] =
L"SYSTEM\\CurrentControlSet\\Control\\Windows";
+static const WCHAR s_szWinlogon[] = L"SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Winlogon";
typedef struct _PRODUCT_OPTION_DATA
{
@@ -401,12 +402,13 @@ typedef struct _PRODUCT_OPTION_DATA
LPCWSTR ProductType;
DWORD ReportAsWorkstation;
DWORD CSDVersion;
+ DWORD LogonType;
} PRODUCT_OPTION_DATA;
static const PRODUCT_OPTION_DATA s_ProductOptionData[] =
{
- { L"Terminal Server\0", L"ServerNT", 0, 0x200 },
- { L"\0", L"WinNT", 1, 0x300 }
+ { L"Terminal Server\0", L"ServerNT", 0, 0x200, 0 },
+ { L"\0", L"WinNT", 1, 0x300, 1 }
};
static BOOL
@@ -487,6 +489,26 @@ DoWriteProductOption(PRODUCT_OPTION nOption)
goto Error;
}
+ RegCloseKey(hKey);
+
+ /* open Winlogon key */
+ error = RegOpenKeyExW(HKEY_LOCAL_MACHINE, s_szWinlogon, 0, KEY_WRITE, &hKey);
+ if (error)
+ {
+ DPRINT1("RegOpenKeyExW failed\n");
+ goto Error;
+ }
+
+ /* write LogonType */
+ dwValue = pData->LogonType;
+ cbData = sizeof(dwValue);
+ error = RegSetValueExW(hKey, L"LogonType", 0, REG_DWORD, (const BYTE
*)&dwValue, cbData);
+ if (error)
+ {
+ DPRINT1("RegSetValueExW failed\n");
+ goto Error;
+ }
+
Error:
if (hKey)
RegCloseKey(hKey);