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

  1. #include "windows.h"
  2. #include "commctrl.h"
  3. #include "resource.h"
  4. #ifndef WS_EX_LAYOUTRTL
  5. #define WS_EX_NOINHERITLAYOUT 0x00100000L // Disable inheritence of mirroring by children
  6. #define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
  7. #endif /* WS_EX_LAYOUTRTL */
  8. /////////////////////////////////////////////////////////////////////////////
  9. //
  10. // ICONS
  11. //
  12. IDI_SYSTEMRESTORE ICON "restore.ico"
  13. IDI_DRIVE_FIXED ICON "drivefix.ico"
  14. /////////////////////////////////////////////////////////////////////////////
  15. //
  16. // BITMAP
  17. //
  18. IDB_PROG_BRAND4 BITMAP "brand4.bmp"
  19. IDB_PROG_BRAND8 BITMAP "brand8.bmp"
  20. /////////////////////////////////////////////////////////////////////////////
  21. //
  22. // String Table
  23. //
  24. STRINGTABLE DISCARDABLE
  25. BEGIN
  26. IDS_SYSTEMRESTORE "System Restore"
  27. END
  28. STRINGTABLE DISCARDABLE
  29. BEGIN
  30. IDS_DRVSTAT_ACTIVE "Monitoring"
  31. IDS_DRVSTAT_FROZEN "Suspended"
  32. IDS_DRVSTAT_EXCLUDED "Turned off"
  33. IDS_DRVSTAT_OFFLINE "Offline"
  34. IDS_DRIVEPROP_TITLE "Drive (%1) Settings"
  35. IDS_DRIVE_SUMMARY "%1 (%2) %3"
  36. IDS_DRIVE_SUMMARY_NO_LABEL "(%1) %2"
  37. 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."
  38. 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."
  39. IDS_DRVLIST_COL_NAME "Drive"
  40. IDS_DRVLIST_COL_STATUS "Status"
  41. 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?"
  42. 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?"
  43. IDS_GROUP_POLICY_ON_OFF "Turn off System Restore (disabled by Group Policy)"
  44. IDS_GROUP_POLICY_CONFIG_ON_OFF "Turn off System Restore on this drive (disabled by Group Policy)"
  45. IDS_ERR_SR_SAFEMODE "System Restore cannot be enabled in Safe Mode. Please restart your machine in normal mode and try again."
  46. 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."
  47. END
  48. STRINGTABLE DISCARDABLE
  49. BEGIN
  50. IDS_RESTORE_POINT_TEXT "Restore Operation"
  51. 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."
  52. IDS_PROGRESS_PREPARE "Preparing to restore..."
  53. IDS_PROGRESS_RESTORE "Restoring files..."
  54. IDS_PROGRESS_SNAPSHOT "Restoring settings..."
  55. IDS_SYSTEM_CHECKPOINT_TEXT "System Checkpoint"
  56. END
  57. /////////////////////////////////////////////////////////////////////////////
  58. //
  59. // DIALOGS
  60. //
  61. // Main page for single drive
  62. IDD_SYSPROP_SINGLE DIALOGEX 32, 10, 257, 220
  63. STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_VISIBLE
  64. CAPTION "System Restore"
  65. FONT 8, "MS Shell Dlg"
  66. BEGIN
  67. ICON IDI_SYSTEMRESTORE,IDC_STATIC,7,7,21,20
  68. LTEXT "System Restore can track and reverse harmful changes to your computer.",
  69. IDC_STATIC,35,7,216,18
  70. CONTROL "&Turn off System Restore",
  71. IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
  72. 7,35,210,10
  73. GROUPBOX "Disk space usage",
  74. IDC_USAGE_GROUPBOX,7,50,242,80
  75. 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.",
  76. IDC_USAGE_HOWTO,14,62,228,24
  77. LTEXT "&Disk space to use:",
  78. IDC_USAGE_LABEL,21,90,214,8
  79. CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
  80. TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
  81. 41,100,140,19
  82. LTEXT "Min",IDC_USAGE_MIN,21,102,19,8
  83. RTEXT "Max",IDC_USAGE_MAX,182,102,19,8
  84. CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,120,140,8
  85. GROUPBOX "Status",
  86. IDC_STATIC,7,140,243,76
  87. CONTROL "",IDC_SD_ICON,"Static",SS_BLACKRECT,14,152,10,10
  88. LTEXT "",IDC_SD_STATUS,28,153,214,8
  89. 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.",
  90. IDC_DCU_HOWTO,14,168,228,26
  91. PUSHBUTTON "Disk &Cleanup...",IDC_DCU_INVOKE,183,196,60,14
  92. END
  93. // Main page for multiple drives
  94. IDD_SYSPROP_MULTI DIALOGEX 32, 10, 256, 218
  95. STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_VISIBLE
  96. CAPTION "System Restore"
  97. FONT 8, "MS Shell Dlg"
  98. BEGIN
  99. ICON IDI_SYSTEMRESTORE,IDC_STATIC,7,7,10,10
  100. LTEXT "System Restore can track and reverse harmful changes to your computer.",
  101. IDC_STATIC,35,7,216,18
  102. CONTROL "&Turn off System Restore on all drives",
  103. IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
  104. 7,35,210,10
  105. GROUPBOX "Drive settings",
  106. IDC_DRIVE_GROUPBOX,7,50,242,120
  107. 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.",
  108. IDC_DRIVE_HOWTO,14,62,228,26
  109. LTEXT "A&vailable drives:",
  110. IDC_DRIVE_LABEL,14,92,164,8
  111. CONTROL "",IDC_DRIVE_LIST,WC_LISTVIEW,
  112. LVS_REPORT|LVS_SHOWSELALWAYS|LVS_SINGLESEL|
  113. WS_HSCROLL|WS_TABSTOP|WS_VSCROLL,
  114. 14,103,172,60,WS_EX_CLIENTEDGE
  115. PUSHBUTTON "&Settings...",IDC_DRIVE_SETTINGS,190,103,52,14
  116. END
  117. // System drive of multiple drives
  118. IDD_SYSPROP_SYSTEM DIALOGEX 32, 10, 256, 198
  119. STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
  120. EXSTYLE WS_EX_CONTEXTHELP
  121. CAPTION "Drive Settings"
  122. FONT 8, "MS Shell Dlg"
  123. BEGIN
  124. ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,10,10
  125. LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
  126. LTEXT "test\ntest\ntest",IDC_SYSDRV_CANNOT_OFF,7,35,242,42
  127. GROUPBOX "Disk space usage",
  128. IDC_USAGE_GROUPBOX,7,84,242,80
  129. 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.",
  130. IDC_USAGE_HOWTO,14,96,228,24
  131. LTEXT "&Disk space to use:",
  132. IDC_USAGE_LABEL,21,124,214,8
  133. CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
  134. TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
  135. 41,134,140,19
  136. LTEXT "Min",IDC_USAGE_MIN,21,136,19,8
  137. RTEXT "Max",IDC_USAGE_MAX,182,136,19,8
  138. CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,154,140,8
  139. PUSHBUTTON "OK",IDOK,145,177,50,14
  140. PUSHBUTTON "Cancel",IDCANCEL,199,177,50,14
  141. END
  142. // System drive of multiple drives (Frozen SR)
  143. IDD_SYSPROP_SYSTEM_FROZEN DIALOGEX 32, 10, 256, 258
  144. STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
  145. EXSTYLE WS_EX_CONTEXTHELP
  146. CAPTION "Drive Settings"
  147. FONT 8, "MS Shell Dlg"
  148. BEGIN
  149. ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,20,20
  150. LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
  151. LTEXT "test\ntest\ntest",IDC_SYSDRV_CANNOT_OFF,7,35,242,42
  152. 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.",
  153. IDC_SYSTEM_DCU_HOWTO,7,84,242,35
  154. PUSHBUTTON "Disk &Cleanup...",IDC_DCU_INVOKE,189,121,60,14
  155. GROUPBOX "Disk space usage",
  156. IDC_USAGE_GROUPBOX,7,144,242,86
  157. 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.",
  158. IDC_USAGE_HOWTO,14,154,228,32
  159. LTEXT "&Disk space to use:",
  160. IDC_USAGE_LABEL,21,190,214,8
  161. CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
  162. TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
  163. 41,201,140,19
  164. LTEXT "Min",IDC_USAGE_MIN,21,202,19,8
  165. RTEXT "Max",IDC_USAGE_MAX,182,202,19,8
  166. CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,220,140,8
  167. PUSHBUTTON "OK",IDOK,145,238,50,14
  168. PUSHBUTTON "Cancel",IDCANCEL,199,238,50,14
  169. END
  170. // Normal drive of multiple drives
  171. IDD_SYSPROP_NORMAL DIALOGEX 32, 10, 256, 164
  172. STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
  173. EXSTYLE WS_EX_CONTEXTHELP
  174. CAPTION "Drive Settings"
  175. FONT 8, "MS Shell Dlg"
  176. BEGIN
  177. ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,10,10
  178. LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
  179. CONTROL "&Turn off System Restore on this drive",
  180. IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
  181. 7,35,242,10
  182. GROUPBOX "Disk space usage",
  183. IDC_USAGE_GROUPBOX,7,50,242,80
  184. 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.",
  185. IDC_USAGE_HOWTO,14,62,228,24
  186. LTEXT "&Disk space to use:",
  187. IDC_USAGE_LABEL,21,90,214,8
  188. CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
  189. TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
  190. 41,100,140,19
  191. LTEXT "Min",IDC_USAGE_MIN,21,102,19,8
  192. RTEXT "Max",IDC_USAGE_MAX,182,102,19,8
  193. CTEXT "10% (500MB)",IDC_USAGE_VALUE,41,120,140,8
  194. PUSHBUTTON "OK",IDOK,145,143,50,14
  195. PUSHBUTTON "Cancel",IDCANCEL,199,143,50,14
  196. END
  197. // Normal drive of multiple drives (Frozen drive)
  198. IDD_SYSPROP_NORMAL_FROZEN DIALOGEX 32, 10, 256, 233
  199. STYLE DS_MODALFRAME | (DS_SETFONT|DS_FIXEDSYS) | WS_POPUP | WS_SYSMENU | WS_VISIBLE
  200. EXSTYLE WS_EX_CONTEXTHELP
  201. CAPTION "Drive Settings"
  202. FONT 8, "MS Shell Dlg"
  203. BEGIN
  204. ICON IDI_DRIVE_FIXED,IDC_STATIC,7,5,21,20
  205. LTEXT "",IDC_DRIVE_SUMMARY,35,10,216,18
  206. CONTROL "&Turn off System Restore on this drive",
  207. IDC_TURN_OFF,"Button",BS_AUTOCHECKBOX|WS_TABSTOP,
  208. 7,35,242,10
  209. 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.",
  210. IDC_NORMAL_DCU_HOWTO,7,50,242,35
  211. PUSHBUTTON "Disk &Cleanup...",IDC_DCU_INVOKE,188,87,60,14
  212. GROUPBOX "Disk space usage",
  213. IDC_USAGE_GROUPBOX,8,108,242,87
  214. 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.",
  215. IDC_USAGE_HOWTO,14,122,228,31
  216. LTEXT "&Disk space to use:",
  217. IDC_USAGE_LABEL,22,156,214,8
  218. CONTROL "",IDC_USAGE_SLIDER,TRACKBAR_CLASS,
  219. TBS_AUTOTICKS|TBS_DOWNISLEFT|WS_TABSTOP,
  220. 42,166,140,19
  221. LTEXT "Min",IDC_USAGE_MIN,22,167,19,8
  222. RTEXT "Max",IDC_USAGE_MAX,183,167,19,8
  223. CTEXT "10% (500MB)",IDC_USAGE_VALUE,42,186,140,8
  224. PUSHBUTTON "OK",IDOK,146,202,50,14
  225. PUSHBUTTON "Cancel",IDCANCEL,200,202,50,14
  226. END
  227. // Progress dialog box for restore operation during shutdown
  228. IDD_PROGRESS DIALOGEX DISCARDABLE 10, 10, 274, 74
  229. STYLE DS_CENTER | WS_POPUP | WS_CAPTION
  230. EXSTYLE WS_EX_TOPMOST
  231. //EXSTYLE WS_EX_RTLREADING | WS_EX_LAYOUTRTL
  232. CAPTION "System Restore"
  233. FONT 8, "MS Shell Dlg"
  234. BEGIN
  235. CONTROL "",IDC_PROGDLG_BRAND,"Static",SS_WHITERECT,0,0,274,44
  236. CONTROL "",IDC_PROGDLG_BITMAP,"Static",SS_BITMAP,20,0,254,44
  237. LTEXT "System Restore",IDC_PROGDLG_TITLE,70,0,164,44,SS_CENTERIMAGE
  238. LTEXT " ",IDC_PROGDLG_STATUS,14,48,246,8
  239. CONTROL "",IDC_PROGDLG_BAR,PROGRESS_CLASS,
  240. PBS_SMOOTH|WS_BORDER|WS_CHILD|WS_VISIBLE,
  241. 14,60,246,6
  242. //LTEXT "Initializing...", IDC_PROGDLG_STATUS, 7, 57, 160, 16
  243. END
  244. /////////////////////////////////////////////////////////////////////////////
  245. //
  246. // Version Infomation
  247. //
  248. #define VER_FILETYPE VFT_APP
  249. #define VER_FILESUBTYPE VFT2_UNKNOWN
  250. #define VER_FILEDESCRIPTION_STR "System Restore Restore Operation Library\0"
  251. #define VER_INTERNALNAME_STR "srrstr\0"
  252. #define VER_ORIGINALFILENAME_STR "srrstr.dll\0"
  253. #include <bldver.h>
  254. #include <common.ver>