Author: dquintana
Date: Mon Sep 29 20:14:21 2014
New Revision: 64403
URL:
http://svn.reactos.org/svn/reactos?rev=64403&view=rev
Log:
[MSGINA]
[SHELL32]
* Implement shell shutdown using a proper shutdown dialog. Patch by Lee Schroeder with a
small change to fix MSVC build.
CORE-7559 #comment Commited into shell-experiments branch r64403.
Modified:
branches/shell-experiments/dll/win32/msgina/CMakeLists.txt
branches/shell-experiments/dll/win32/msgina/lang/bg-BG.rc
branches/shell-experiments/dll/win32/msgina/lang/cs-CZ.rc
branches/shell-experiments/dll/win32/msgina/lang/de-DE.rc
branches/shell-experiments/dll/win32/msgina/lang/en-US.rc
branches/shell-experiments/dll/win32/msgina/lang/es-ES.rc
branches/shell-experiments/dll/win32/msgina/lang/fr-FR.rc
branches/shell-experiments/dll/win32/msgina/lang/he-IL.rc
branches/shell-experiments/dll/win32/msgina/lang/id-ID.rc
branches/shell-experiments/dll/win32/msgina/lang/it-IT.rc
branches/shell-experiments/dll/win32/msgina/lang/ja-JP.rc
branches/shell-experiments/dll/win32/msgina/lang/no-NO.rc
branches/shell-experiments/dll/win32/msgina/lang/pl-PL.rc
branches/shell-experiments/dll/win32/msgina/lang/ro-RO.rc
branches/shell-experiments/dll/win32/msgina/lang/ru-RU.rc
branches/shell-experiments/dll/win32/msgina/lang/sk-SK.rc
branches/shell-experiments/dll/win32/msgina/lang/sq-AL.rc
branches/shell-experiments/dll/win32/msgina/lang/tr-TR.rc
branches/shell-experiments/dll/win32/msgina/lang/uk-UA.rc
branches/shell-experiments/dll/win32/msgina/resource.h
branches/shell-experiments/dll/win32/msgina/stubs.c
branches/shell-experiments/dll/win32/shell32/CMakeLists.txt
branches/shell-experiments/dll/win32/shell32/dialogs.cpp
branches/shell-experiments/dll/win32/shell32/precomp.h
Modified: branches/shell-experiments/dll/win32/msgina/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/CMakeLists.txt [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/CMakeLists.txt [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -9,6 +9,7 @@
gui.c
lsa.c
msgina.c
+ shutdown.c
stubs.c
tui.c
msgina.h)
@@ -21,7 +22,7 @@
set_module_type(msgina win32dll)
target_link_libraries(msgina wine)
-add_importlibs(msgina advapi32 user32 gdi32 userenv msvcrt kernel32 ntdll)
+add_importlibs(msgina advapi32 user32 gdi32 powrprof userenv msvcrt kernel32 ntdll)
add_delay_importlibs(msgina secur32)
add_pch(msgina msgina.h SOURCE)
add_cd_file(TARGET msgina DESTINATION reactos/system32 FOR all)
Modified: branches/shell-experiments/dll/win32/msgina/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/bg-BG.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/bg-BG.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "ÐзклÑÑване на РеакÑÐС"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Ðакво иÑкаÑе да напÑави
компÑÑÑÑа?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "ÐобÑе", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "ÐÑказ", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "Ðомо&Ñ", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "ÐдÑавейÑе!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/cs-CZ.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/cs-CZ.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -142,6 +142,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Vypnout ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Storno", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&NápovÄda", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "VÃtejte!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/de-DE.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/de-DE.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "ReactOS herunterfahren"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Welcher Vorgang soll durchgeführt werden?", IDC_STATIC, 39,
57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Abbrechen", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Hilfe", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "Willkommen!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/en-US.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/en-US.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Shut Down ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "Welcome!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/es-ES.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/es-ES.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -139,6 +139,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Apagar ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "¿&Que quieres que haga el equipo?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "Aceptar", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Cancelar", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Ayuda", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "¡Bienvenido!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/fr-FR.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/fr-FR.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Fermer ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Que voulez-vous que l'ordinateur fasse ?", IDC_STATIC, 39,
57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Annuler", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Aide", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "Bienvenue!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/he-IL.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/he-IL.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/he-IL.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Shut Down ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "×ר×××× ×××××!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/id-ID.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/id-ID.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Shut Down ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "Selamat datang!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/it-IT.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/it-IT.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -144,6 +144,21 @@
BEGIN
EDITTEXT IDC_LEGALNOTICE_TEXT, 7, 7, 266, 165, ES_LEFT | ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
+END
+
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Spegnimento di ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Cosa volete che faccia ReactOS?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Annulla", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Aiuto", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: branches/shell-experiments/dll/win32/msgina/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/ja-JP.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/ja-JP.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "ReactOSã®ã·ã£ãããã¦ã³"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&ã³ã³ãã¥ã¼ã¿ã®åä½ãé¸æãã¦ãã ãã",
IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "ãã£ã³ã»ã«", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "ãã«ã(&H)", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "ãããã!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/no-NO.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/no-NO.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -137,6 +137,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Slå av ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Hva vil du at datamaskinen skal gjøre?", IDC_STATIC, 39, 57,
167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Avbryt", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Hjelp", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "Velkommen!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/pl-PL.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/pl-PL.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -145,6 +145,21 @@
BEGIN
EDITTEXT IDC_LEGALNOTICE_TEXT, 7, 7, 266, 165, ES_LEFT | ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
+END
+
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Zamknij ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Co chcesz, aby zrobiÅ komputer?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Anuluj", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Pomoc", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: branches/shell-experiments/dll/win32/msgina/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/ro-RO.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/ro-RO.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -144,6 +144,21 @@
BEGIN
EDITTEXT IDC_LEGALNOTICE_TEXT, 7, 7, 266, 165, ES_LEFT | ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON "Ã&nchide", IDOK, 115, 179, 50, 14
+END
+
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Ãnchidere ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Ce doriÈi sÄ se întâmple?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "Con&firmÄ", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "A&nuleazÄ", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Manualâ¦", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: branches/shell-experiments/dll/win32/msgina/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/ru-RU.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/ru-RU.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -139,6 +139,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "ÐавеÑÑение ÑабоÑÑ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&ÐÑбеÑиÑе желаемое дейÑÑвие.",
IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "ÐÑмена", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&СпÑавка", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "ÐобÑо пожаловаÑÑ!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/sk-SK.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/sk-SK.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -142,6 +142,21 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Vypnutie systému ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Äo chcete aby poÄÃtaÄ urobil?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Zrušiť", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&PomocnÃk", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "Vitajte!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/sq-AL.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/sq-AL.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -128,7 +128,7 @@
COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Cancel", IDCANCEL, 204, 122, 55, 14
+ PUSHBUTTON "Anulo", IDCANCEL, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -138,6 +138,21 @@
BEGIN
EDITTEXT IDC_LEGALNOTICE_TEXT, 7, 7, 266, 165, ES_LEFT | ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
+END
+
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Shut Down ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Anulo", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Ndihmë", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: branches/shell-experiments/dll/win32/msgina/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/tr-TR.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/tr-TR.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -139,6 +139,21 @@
DEFPUSHBUTTON "Tamam", IDOK, 115, 179, 50, 14
END
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Oturumu Kapat"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&Bilgisayarınızın ne yapmasını istiyorsunuz?", IDC_STATIC,
39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "Tamam", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "Ä°ptal", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&Yardım", IDHELP, 204, 122, 55, 14
+END
+
STRINGTABLE
BEGIN
IDS_LOGGEDOUTSAS "HoÅgeldiniz!"
Modified: branches/shell-experiments/dll/win32/msgina/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/lang/uk-UA.rc [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/lang/uk-UA.rc [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -143,6 +143,21 @@
BEGIN
EDITTEXT IDC_LEGALNOTICE_TEXT, 7, 7, 266, 165, ES_LEFT | ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
+END
+
+IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "ÐавеÑÑÐµÐ½Ð½Ñ ÑобоÑи ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
+ ICON IDI_SHELL_SHUTDOWN, IDI_SHELL_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
+ LTEXT "&ÐибеÑÑÑÑ Ð¾Ð´Ð½Ñ Ð· ÑакиÑ
можливоÑÑей?", IDC_STATIC, 39, 57, 167, 10
+ COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL
+ LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ PUSHBUTTON "СкаÑÑваÑи", IDCANCEL, 143, 122, 55, 14
+ PUSHBUTTON "&ÐовÑдка", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: branches/shell-experiments/dll/win32/msgina/resource.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/resource.h [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/resource.h [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -8,6 +8,7 @@
#define IDD_LOCKED_DLG 104
#define IDD_UNLOCK_DLG 105
#define IDD_SHUTDOWN_DLG 108
+#define IDD_SHUTDOWN_SHELL 109
#define IDC_LOGOFF 1001
#define IDC_USERNAME 1002
Modified: branches/shell-experiments/dll/win32/msgina/stubs.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
==============================================================================
--- branches/shell-experiments/dll/win32/msgina/stubs.c [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/msgina/stubs.c [iso-8859-1] Mon Sep 29 20:14:21
2014
@@ -10,32 +10,6 @@
*/
#include "msgina.h"
-
-/*
- * @unimplemented
- */
-DWORD WINAPI
-ShellShutdownDialog(
- HWND hParent,
- LPWSTR lpUsername,
- BOOL bHideLogoff)
-{
- UNREFERENCED_PARAMETER(hParent);
- UNREFERENCED_PARAMETER(lpUsername);
- UNREFERENCED_PARAMETER(bHideLogoff);
-
- /* Return values:
- * 0x00: Cancelled/Help
- * 0x01: Log off user
- * 0x02: Shutdown
- * 0x04: Reboot
- * 0x10: Standby
- * 0x40: Hibernate
- */
- UNIMPLEMENTED;
- return FALSE;
-}
-
/*
* @unimplemented
Modified: branches/shell-experiments/dll/win32/shell32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -98,6 +98,7 @@
browseui
gdi32
user32
+ powrprof
comctl32
comdlg32
shdocvw
Modified: branches/shell-experiments/dll/win32/shell32/dialogs.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/dialogs.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/dialogs.cpp [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -116,6 +116,7 @@
pIconContext = (PPICK_ICON_CONTEXT)lParam;
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)pIconContext);
pIconContext->hDlgCtrl = GetDlgItem(hwndDlg, IDC_PICKICON_LIST);
+ SendMessageW(pIconContext->hDlgCtrl, LB_SETCOLUMNWIDTH, 32, 0);
EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc,
(LPARAM)pIconContext);
if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH))
SetDlgItemTextW(hwndDlg, IDC_EDIT_PATH, szText);
@@ -695,6 +696,44 @@
return RestartDialogEx(hWndOwner, lpstrReason, uFlags, 0);
}
+ /*************************************************************************
+ * Used to get the shutdown privilege
+ */
+VOID ExitWindows_GetShutdownPrivilege(VOID)
+{
+ HANDLE hToken;
+ TOKEN_PRIVILEGES npr;
+
+ /* enable shut down privilege for current process */
+ if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
+ {
+ LookupPrivilegeValueA(0, "SeShutdownPrivilege",
&npr.Privileges[0].Luid);
+
+ npr.PrivilegeCount = 1;
+ npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0);
+
+ CloseHandle(hToken);
+ }
+}
+
+/*************************************************************************
+ * ExitWindowsDialog_backup
+ *
+ * NOTES
+ * used as a backup solution to shutdown the OS in case msgina.dll somehow
+ * cannot be found.
+ */
+VOID ExitWindowsDialog_backup(HWND hWndOwner)
+{
+ TRACE("(%p)\n", hWndOwner);
+
+ if (ConfirmDialog(hWndOwner, IDS_SHUTDOWN_PROMPT, IDS_SHUTDOWN_TITLE))
+ {
+ ExitWindows_GetShutdownPrivilege();
+ ExitWindowsEx(EWX_SHUTDOWN, 0);
+ }
+}
/*************************************************************************
* ExitWindowsDialog [SHELL32.60]
@@ -702,24 +741,85 @@
* NOTES
* exported by ordinal
*/
+/*
+ * TODO:
+ * - Implement the ability to show either the Welcome Screen or the classic dialog boxes
based upon the
+ * registry value: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LogonType.
+ */
void WINAPI ExitWindowsDialog(HWND hWndOwner)
{
+ typedef DWORD (WINAPI *ShellShFunc)(HWND hParent, WCHAR *Username, BOOL
bHideLogoff);
+ HINSTANCE msginaDll = LoadLibraryA("msgina.dll");
+
TRACE("(%p)\n", hWndOwner);
- if (ConfirmDialog(hWndOwner, IDS_SHUTDOWN_PROMPT, IDS_SHUTDOWN_TITLE))
- {
- HANDLE hToken;
- TOKEN_PRIVILEGES npr;
-
- /* enable shutdown privilege for current process */
- if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
- {
- LookupPrivilegeValueA(0, "SeShutdownPrivilege",
&npr.Privileges[0].Luid);
- npr.PrivilegeCount = 1;
- npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0);
- CloseHandle(hToken);
- }
- ExitWindowsEx(EWX_SHUTDOWN, 0);
- }
-}
+ /* If the DLL cannot be found for any reason, then it simply uses a
+ dialog box to ask if the user wants to shut down the computer. */
+ if(!msginaDll)
+ {
+ TRACE("Unable to load msgina.dll.\n");
+ ExitWindowsDialog_backup(hWndOwner);
+ return;
+ }
+
+ ShellShFunc pShellShutdownDialog = (ShellShFunc) GetProcAddress(msginaDll,
"ShellShutdownDialog");
+
+ if(pShellShutdownDialog)
+ {
+ /* Actually call the function */
+ DWORD returnValue = pShellShutdownDialog(hWndOwner, NULL, FALSE);
+
+ switch(returnValue)
+ {
+ case 0x01: /* Log off user */
+ {
+ ExitWindowsEx(EWX_LOGOFF, 0);
+ break;
+ }
+ case 0x02: /* Shut down */
+ {
+ ExitWindows_GetShutdownPrivilege();
+ ExitWindowsEx(EWX_SHUTDOWN, 0);
+ break;
+ }
+ case 0x03: /* Install Updates/Shutdown (?) */
+ {
+ break;
+ }
+ case 0x04: /* Reboot */
+ {
+ ExitWindows_GetShutdownPrivilege();
+ ExitWindowsEx(EWX_REBOOT, 0);
+ break;
+ }
+ case 0x10: /* Sleep */
+ {
+ if(IsPwrSuspendAllowed())
+ {
+ ExitWindows_GetShutdownPrivilege();
+ SetSuspendState(FALSE, FALSE, FALSE);
+ }
+ break;
+ }
+ case 0x40: /* Hibernate */
+ {
+ if(IsPwrHibernateAllowed())
+ {
+ ExitWindows_GetShutdownPrivilege();
+ SetSuspendState(TRUE, FALSE, TRUE);
+ }
+ break;
+ }
+ /* If the option is any other value */
+ default:
+ break;
+ }
+ }
+ else
+ {
+ /* If the function cannot be found, then revert to using the backup solution */
+ TRACE("Unable to find the 'ShellShutdownDialog' function");
+ FreeLibrary(msginaDll);
+ ExitWindowsDialog_backup(hWndOwner);
+ }
+}
Modified: branches/shell-experiments/dll/win32/shell32/precomp.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/precomp.h [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/precomp.h [iso-8859-1] Mon Sep 29
20:14:21 2014
@@ -29,6 +29,7 @@
#include <strsafe.h>
#include <atlbase.h>
#include <atlcom.h>
+#include <powrprof.h>
//#include "base/shell/explorer-new/todo.h"
//#include "dlgs.h"