Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

281 lines
13 KiB

#include "windows.h"
#include "commctrl.h"
#include "resource.h"
#ifndef WS_EX_LAYOUTRTL
#define WS_EX_NOINHERITLAYOUT 0x00100000L // Disable inheritence of mirroring by children
#define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
#endif /* WS_EX_LAYOUTRTL */
/////////////////////////////////////////////////////////////////////////////
//
// ICONS
//
IDI_SYSTEMRESTORE ICON "restore.ico"
IDI_DRIVE_FIXED ICON "drivefix.ico"
/////////////////////////////////////////////////////////////////////////////
//
// BITMAP
//
IDB_PROG_BRAND4 BITMAP "brand4.bmp"
IDB_PROG_BRAND8 BITMAP "brand8.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_SYSTEMRESTORE "System Restore"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DRVSTAT_ACTIVE "Monitoring"
IDS_DRVSTAT_FROZEN "Suspended"
IDS_DRVSTAT_EXCLUDED "Turned off"
IDS_DRVSTAT_OFFLINE "Offline"
IDS_DRIVEPROP_TITLE "Drive (%1) Settings"
IDS_DRIVE_SUMMARY "%1 (%2) %3"
IDS_DRIVE_SUMMARY_NO_LABEL "(%1) %2"
IDS_SYSDRV_CANNOT_OFF "%1 (%2) is the system drive. You cannot turn off System Restore on this drive without turning it off on all drives. To do this, click OK or Cancel to return to the System Restore tab."
IDS_SYSDRV_CANNOT_OFF_NO_LABEL "(%1) is the system drive. You cannot turn off System Restore on this drive without turning it off on all drives. To do this, click OK or Cancel to return to the System Restore tab."
IDS_DRVLIST_COL_NAME "Drive"
IDS_DRVLIST_COL_STATUS "Status"
IDS_CONFIRM_TURN_SR_OFF "You have chosen to turn off System Restore. If you continue, all existing restore points will be deleted, and you will not be able to track or undo changes to your computer.\n\nDo you want to turn off System Restore?"
IDS_CONFIRM_TURN_DRV_OFF "%1 (%2)\n\nYou have chosen to turn off System Restore on this drive. If you continue, you will not be able to track or undo harmful changes on this drive.\n\nDo you want to turn off System Restore on this drive?"
IDS_GROUP_POLICY_ON_OFF "Turn off System Restore (disabled by Group Policy)"
IDS_GROUP_POLICY_CONFIG_ON_OFF "Turn off System Restore on this drive (disabled by Group Policy)"
IDS_ERR_SR_SAFEMODE "System Restore cannot be enabled in Safe Mode. Please restart your machine in normal mode and try again."
IDS_ERR_SR_ON_OFF "System Restore encountered an error trying to enable/disable one or more drives. Please restart your machine and try again."
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_RESTORE_POINT_TEXT "Restore Operation"
IDS_ERROR_LOWPRIVILEGE "You do not have sufficient security privileges to restore your system.\nPlease contact your site administrator, or logout and log in again as an administrator and try again."
IDS_PROGRESS_PREPARE "Preparing to restore..."
IDS_PROGRESS_RESTORE "Restoring files..."
IDS_PROGRESS_SNAPSHOT "Restoring settings..."
IDS_SYSTEM_CHECKPOINT_TEXT "System Checkpoint"
END
/////////////////////////////////////////////////////////////////////////////
//
// DIALOGS
//
// Main page for single drive
IDD_SYSPROP_SINGLE DIALOGEX 32, 10, 257, 220
STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_VISIBLE
CAPTION "System Restore"
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_SYSTEMRESTORE,IDC_STATIC,7,7,21,20
LTEXT "System Restore can track and reverse harmful changes to your computer.",
IDC_STATIC,35,7,216,18
CONTROL "&Turn off System Restore",
IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
7,35,210,10
GROUPBOX "Disk space usage",
IDC_USAGE_GROUPBOX,7,50,242,80
LTEXT "Move the slider to the right to increase or to the left to decrease the amount of disk space for System Restore. Decreasing the disk space may reduce the number of available restore points.",
IDC_USAGE_HOWTO,14,62,228,24
LTEXT "&Disk space to use:",
IDC_USAGE_LABEL,21,90,214,8
CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
41,100,140,19
LTEXT "Min",IDC_USAGE_MIN,21,102,19,8
RTEXT "Max",IDC_USAGE_MAX,182,102,19,8
CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,120,140,8
GROUPBOX "Status",
IDC_STATIC,7,140,243,76
CONTROL "",IDC_SD_ICON,"Static",SS_BLACKRECT,14,152,10,10
LTEXT "",IDC_SD_STATUS,28,153,214,8
LTEXT "System Restore is suspended because there is not enough disk space available. To restart System Restore, click Disk Cleanup and ensure at least %d MB of free disk space is available.",
IDC_DCU_HOWTO,14,168,228,26
PUSHBUTTON "Disk &Cleanup...",IDC_DCU_INVOKE,183,196,60,14
END
// Main page for multiple drives
IDD_SYSPROP_MULTI DIALOGEX 32, 10, 256, 218
STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_VISIBLE
CAPTION "System Restore"
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_SYSTEMRESTORE,IDC_STATIC,7,7,10,10
LTEXT "System Restore can track and reverse harmful changes to your computer.",
IDC_STATIC,35,7,216,18
CONTROL "&Turn off System Restore on all drives",
IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
7,35,210,10
GROUPBOX "Drive settings",
IDC_DRIVE_GROUPBOX,7,50,242,120
LTEXT "To change the status of System Restore or the maximum amount of disk space available to System Restore on a drive, select the drive, and then click Settings.",
IDC_DRIVE_HOWTO,14,62,228,26
LTEXT "A&vailable drives:",
IDC_DRIVE_LABEL,14,92,164,8
CONTROL "",IDC_DRIVE_LIST,WC_LISTVIEW,
LVS_REPORT|LVS_SHOWSELALWAYS|LVS_SINGLESEL|
WS_HSCROLL|WS_TABSTOP|WS_VSCROLL,
14,103,172,60,WS_EX_CLIENTEDGE
PUSHBUTTON "&Settings...",IDC_DRIVE_SETTINGS,190,103,52,14
END
// System drive of multiple drives
IDD_SYSPROP_SYSTEM DIALOGEX 32, 10, 256, 198
STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Drive Settings"
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,10,10
LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
LTEXT "test\ntest\ntest",IDC_SYSDRV_CANNOT_OFF,7,35,242,42
GROUPBOX "Disk space usage",
IDC_USAGE_GROUPBOX,7,84,242,80
LTEXT "Move the slider to the right to increase or to the left to decrease the amount of disk space for System Restore. Decreasing the disk space may reduce the number of available restore points.",
IDC_USAGE_HOWTO,14,96,228,24
LTEXT "&Disk space to use:",
IDC_USAGE_LABEL,21,124,214,8
CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
41,134,140,19
LTEXT "Min",IDC_USAGE_MIN,21,136,19,8
RTEXT "Max",IDC_USAGE_MAX,182,136,19,8
CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,154,140,8
PUSHBUTTON "OK",IDOK,145,177,50,14
PUSHBUTTON "Cancel",IDCANCEL,199,177,50,14
END
// System drive of multiple drives (Frozen SR)
IDD_SYSPROP_SYSTEM_FROZEN DIALOGEX 32, 10, 256, 258
STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Drive Settings"
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,20,20
LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
LTEXT "test\ntest\ntest",IDC_SYSDRV_CANNOT_OFF,7,35,242,42
LTEXT "System Restore is suspended because there is not enough disk space available on one of the drives. To restart System Restore, click Disk Cleanup and ensure at least %d MB of free disk space is available on all drives.",
IDC_SYSTEM_DCU_HOWTO,7,84,242,35
PUSHBUTTON "Disk &Cleanup...",IDC_DCU_INVOKE,189,121,60,14
GROUPBOX "Disk space usage",
IDC_USAGE_GROUPBOX,7,144,242,86
LTEXT "Move the slider to the right to increase or to the left to decrease the amount of disk space for System Restore. Decreasing the disk space may reduce the number of available restore points.",
IDC_USAGE_HOWTO,14,154,228,32
LTEXT "&Disk space to use:",
IDC_USAGE_LABEL,21,190,214,8
CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
41,201,140,19
LTEXT "Min",IDC_USAGE_MIN,21,202,19,8
RTEXT "Max",IDC_USAGE_MAX,182,202,19,8
CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,220,140,8
PUSHBUTTON "OK",IDOK,145,238,50,14
PUSHBUTTON "Cancel",IDCANCEL,199,238,50,14
END
// Normal drive of multiple drives
IDD_SYSPROP_NORMAL DIALOGEX 32, 10, 256, 164
STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Drive Settings"
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,10,10
LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
CONTROL "&Turn off System Restore on this drive",
IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
7,35,242,10
GROUPBOX "Disk space usage",
IDC_USAGE_GROUPBOX,7,50,242,80
LTEXT "Move the slider to the right to increase or to the left to decrease the amount of disk space for System Restore. Decreasing the disk space may reduce the number of available restore points.",
IDC_USAGE_HOWTO,14,62,228,24
LTEXT "&Disk space to use:",
IDC_USAGE_LABEL,21,90,214,8
CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
41,100,140,19
LTEXT "Min",IDC_USAGE_MIN,21,102,19,8
RTEXT "Max",IDC_USAGE_MAX,182,102,19,8
CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,120,140,8
PUSHBUTTON "OK",IDOK,145,143,50,14
PUSHBUTTON "Cancel",IDCANCEL,199,143,50,14
END
// Normal drive of multiple drives (Frozen drive)
IDD_SYSPROP_NORMAL_FROZEN DIALOGEX 32, 10, 256, 233
STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Drive Settings"
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,21,20
LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
CONTROL "&Turn off System Restore on this drive",
IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
7,35,242,10
LTEXT "System Restore is suspended because there is not enough disk space available on one of the drives. To restart System Restore, click Disk Cleanup and ensure at least %d MB of free disk space is available on all drives.",
IDC_NORMAL_DCU_HOWTO,7,50,242,35
PUSHBUTTON "Disk &Cleanup...",IDC_DCU_INVOKE,188,87,60,14
GROUPBOX "Disk space usage",
IDC_USAGE_GROUPBOX,8,108,242,87
LTEXT "Move the slider to the right to increase or to the left to decrease the amount of disk space for System Restore. Decreasing the disk space may reduce the number of available restore points.",
IDC_USAGE_HOWTO,14,122,228,31
LTEXT "&Disk space to use:",
IDC_USAGE_LABEL,22,156,214,8
CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
42,166,140,19
LTEXT "Min",IDC_USAGE_MIN,22,167,19,8
RTEXT "Max",IDC_USAGE_MAX,183,167,19,8
CTEXT "10% (500MB)",IDC_USAGE_VALUE,42,186,140,8
PUSHBUTTON "OK",IDOK,146,202,50,14
PUSHBUTTON "Cancel",IDCANCEL,200,202,50,14
END
// Progress dialog box for restore operation during shutdown
IDD_PROGRESS DIALOGEX DISCARDABLE 10, 10, 274, 74
STYLE DS_CENTER | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_TOPMOST
//EXSTYLE WS_EX_RTLREADING | WS_EX_LAYOUTRTL
CAPTION "System Restore"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "",IDC_PROGDLG_BRAND,"Static",SS_WHITERECT,0,0,274,44
CONTROL "",IDC_PROGDLG_BITMAP,"Static",SS_BITMAP,20,0,254,44
LTEXT "System Restore",IDC_PROGDLG_TITLE,70,0,164,44,SS_CENTERIMAGE
LTEXT " ",IDC_PROGDLG_STATUS,14,48,246,8
CONTROL "",IDC_PROGDLG_BAR,PROGRESS_CLASS,
PBS_SMOOTH|WS_BORDER|WS_CHILD|WS_VISIBLE,
14,60,246,6
//LTEXT "Initializing...", IDC_PROGDLG_STATUS, 7, 57, 160, 16
END
/////////////////////////////////////////////////////////////////////////////
//
// Version Infomation
//
#define VER_FILETYPE VFT_APP
#define VER_FILESUBTYPE VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR "System Restore Restore Operation Library\0"
#define VER_INTERNALNAME_STR "srrstr\0"
#define VER_ORIGINALFILENAME_STR "srrstr.dll\0"
#include <bldver.h>
#include <common.ver>