#define IDC_SUNKEN_LINEHEADER 12327
#define IDS_CLOSE 4160
+#define IDS_RESTARTSRV 4161
+#define IDS_CAPTION 4162
/* Toolbar customization dialog */
#define IDD_TBCUSTOMIZE 200
if (PROPSHEET_Apply(hwnd, wID == IDOK ? 1: 0) == FALSE)
break;
+ PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
+
if (wID == IDOK)
{
- PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
-
/* don't overwrite ID_PSRESTARTWINDOWS or ID_PSREBOOTSYSTEM */
if (psInfo->result == 0)
psInfo->result = IDOK;
else
EnableWindow(hwndApplyBtn, FALSE);
+ if (psInfo->result == ID_PSREBOOTSYSTEM)
+ {
+ WCHAR text[512];
+ WCHAR caption[512];
+ int ret;
+
+ ret = LoadStringW(GetModuleHandleA("comctl32.dll"), IDS_RESTARTSRV, text, 512);
+ ret &= LoadStringW(GetModuleHandleA("comctl32.dll"), IDS_CAPTION, caption, 512);
+
+ if (ret && MessageBoxW(hwnd, text, caption, MB_YESNO | MB_ICONQUESTION) == IDYES)
+ InitiateSystemShutdownExW(NULL, NULL, 0, TRUE, FALSE);
+ }
break;
}