Skeleton dialog box to control system page file size
Modified: trunk/reactos/lib/cpl/sysdm/advanced.c
Modified: trunk/reactos/lib/cpl/sysdm/en.rc
Modified: trunk/reactos/lib/cpl/sysdm/resource.h
Modified: trunk/reactos/lib/cpl/sysdm/sysdm.h
Modified: trunk/reactos/lib/cpl/sysdm/sysdm.xml
Added: trunk/reactos/lib/cpl/sysdm/virtmem.c

Modified: trunk/reactos/lib/cpl/sysdm/advanced.c
--- trunk/reactos/lib/cpl/sysdm/advanced.c	2006-01-03 18:49:10 UTC (rev 20550)
+++ trunk/reactos/lib/cpl/sysdm/advanced.c	2006-01-03 21:00:06 UTC (rev 20551)
@@ -48,6 +48,13 @@
     case WM_COMMAND:
       switch(LOWORD(wParam))
       {
+        case IDC_PERFOR:
+          DialogBox(hApplet,
+                    MAKEINTRESOURCE(IDD_VIRTMEM),
+                    hwndDlg,
+                    VirtMemDlgProc);
+          break;
+
         case IDC_ENVVAR:
           DialogBox(hApplet,
                     MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
@@ -60,4 +67,3 @@
   }
   return FALSE;
 }
-

Modified: trunk/reactos/lib/cpl/sysdm/en.rc
--- trunk/reactos/lib/cpl/sysdm/en.rc	2006-01-03 18:49:10 UTC (rev 20550)
+++ trunk/reactos/lib/cpl/sysdm/en.rc	2006-01-03 21:00:06 UTC (rev 20551)
@@ -93,6 +93,34 @@
   PUSHBUTTON "&Startup and Recovery...",IDC_STAREC,PROPSHEETWIDTH-(20*PROPSHEETPADDING),LABELLINE(19)+2,(18*PROPSHEETPADDING),14
 END
 
+
+IDD_VIRTMEM DIALOGEX 6, 6, 223, 248
+STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Virtual Memory"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+  CONTROL "",IDC_PAGEFILELIST,"ListBox",0x50010141,10,16,204,52,0x00000200
+  LTEXT "Drive [Volume Label]", -1, 12, 5, 96, 9
+  LTEXT "Paging File Size (MB)", -1, 114, 5, 100, 9
+  CONTROL "Paging file size for selected drive",IDC_DRIVEGROUP,"Button",0x50000007,10,70,204,104
+  LTEXT "", IDC_DRIVE, 20, 84, 100, 9
+  LTEXT "", IDC_SPACEAVAIL, 20, 94, 112, 8
+  CONTROL "Custom size",IDC_CUSTOM,"Button",0x50010009,20,105,54,9
+  CONTROL "",IDC_INITIALSIZE,"Edit",0x50010000,100,114,44,13,0x00000200
+  CONTROL "",IDC_MAXSIZE,"Edit",0x50010000,100,129,44,13,0x00000200
+  LTEXT "Initial size (MB):", -1 ,22,118,54,9
+  LTEXT "Maximum size (MB):", -1 ,22,131,64,9
+  CONTROL "System managed size",IDC_SYSMANSIZE,"Button",0x50010009,20,145,88,9
+  CONTROL "No paging file",IDC_NOPAGEFILE,"Button",0x50010009,20,158,78,9
+  PUSHBUTTON "Set",IDC_SET, 158, 155, 50, 13
+  CONTROL "Total paging file size for all drives", IDC_TOTALGROUP, "Button", 0x50000007, 10, 179, 204, 46
+  PUSHBUTTON "OK", IDOK, 114, 232, 48, 13
+  PUSHBUTTON "Cancel", IDCANCEL, 168, 232, 48, 13
+  LTEXT "", IDC_MINIMUM, 18, 200, 100, 9
+  LTEXT "", IDC_RECOMMENDED, 18, 200, 100, 9
+  LTEXT "", IDC_CURRENT, 18, 200, 100, 9
+END
+
 IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245
 STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
 CAPTION "Environment Variables"
@@ -132,8 +160,13 @@
 END
 
 
-STRINGTABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
   IDS_CPLSYSTEMNAME "System"
   IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings."
+  IDS_DRIVE "Drive:			%s"
+  IDS_SPACE "Space available		%s"
+  IDS_MIN "Minimum allowed:	%s"
+  IDS_REC "Recommended:		%s"
+  IDS_CUR "Currently allocated: %s"
 END

Modified: trunk/reactos/lib/cpl/sysdm/resource.h
--- trunk/reactos/lib/cpl/sysdm/resource.h	2006-01-03 18:49:10 UTC (rev 20550)
+++ trunk/reactos/lib/cpl/sysdm/resource.h	2006-01-03 21:00:06 UTC (rev 20551)
@@ -10,42 +10,42 @@
 #define ICONSIZE         16
 
 /* ids */
-#define RC_LICENSE      101
-#define RTDATA  300
+#define RC_LICENSE                      101
+#define RTDATA                          300
 
-#define IDI_CPLSYSTEM	100
-#define IDI_DEVMGR      101
+#define IDI_CPLSYSTEM	                100
+#define IDI_DEVMGR                      101
 
-#define IDD_PROPPAGEGENERAL	100
-#define IDD_PROPPAGECOMPUTER	101
-#define IDD_PROPPAGEHARDWARE	102
-#define IDD_PROPPAGEUSERPROFILE	103
-#define IDD_PROPPAGEADVANCED	104
+#define IDD_PROPPAGEGENERAL	            100
+#define IDD_PROPPAGECOMPUTER	        101
+#define IDD_PROPPAGEHARDWARE	        102
+#define IDD_PROPPAGEUSERPROFILE	        103
+#define IDD_PROPPAGEADVANCED	        104
 
-#define IDS_CPLSYSTEMNAME	1001
-#define IDS_CPLSYSTEMDESCRIPTION	2001
+#define IDS_CPLSYSTEMNAME	           1001
+#define IDS_CPLSYSTEMDESCRIPTION	   2001
 
 /* controls */
-#define IDC_LICENSEMEMO 101
+#define IDC_LICENSEMEMO                 101
 #define IDC_PROCESSORMANUFACTURER       102
-#define IDC_PROCESSOR   103
-#define IDC_PROCESSORSPEED      104
-#define IDC_SYSTEMMEMORY        105
-#define IDC_DEVMGR      106
-#define IDC_ENVVAR	107
-#define IDC_STAREC	108
-#define IDC_PERFOR	109
-#define IDC_ICON1       201
+#define IDC_PROCESSOR                   103
+#define IDC_PROCESSORSPEED              104
+#define IDC_SYSTEMMEMORY                105
+#define IDC_DEVMGR                      106
+#define IDC_ENVVAR	                    107
+#define IDC_STAREC	                    108
+#define IDC_PERFOR	                    109
+#define IDC_ICON1                       201
 
-#define IDC_COMPUTERNAME	202
-#define IDC_WORKGROUPDOMAIN_NAME	203
-#define IDC_WORKGROUPDOMAIN	204
-#define IDC_NETWORK_ID	205
-#define IDC_NETWORK_PROPERTY	206
-#define IDC_HARDWARE_WIZARD	207
-#define IDC_HARDWARE_PROFILE	210
-#define IDC_HARDWARE_DRIVER_SIGN	211
-#define IDC_HARDWARE_DEVICE_MANAGER	212
+#define IDC_COMPUTERNAME	            202
+#define IDC_WORKGROUPDOMAIN_NAME	    203
+#define IDC_WORKGROUPDOMAIN	            204
+#define IDC_NETWORK_ID	                205
+#define IDC_NETWORK_PROPERTY	        206
+#define IDC_HARDWARE_WIZARD	            207
+#define IDC_HARDWARE_PROFILE	        210
+#define IDC_HARDWARE_DRIVER_SIGN	    211
+#define IDC_HARDWARE_DEVICE_MANAGER	    212
 
 #define IDC_USERPROFILE_LIST            213
 #define IDC_USERPROFILE_DELETE          214
@@ -66,6 +66,32 @@
 #define IDC_VARIABLE_NAME               230
 #define IDC_VARIABLE_VALUE              231
 
+/* Virtual memory */
+#define IDD_VIRTMEM                     107
+#define IDC_PAGEFILELIST                240
+#define IDC_DRIVEGROUP                  241
+#define IDC_DRIVE                       242
+#define IDC_SPACEAVAIL                  243
+#define IDC_CUSTOM                      244
+#define IDC_INITIALSIZE                 245
+#define IDC_MAXSIZE                     246
+#define IDC_SYSMANSIZE                  247
+#define IDC_NOPAGEFILE                  248
+#define IDC_SET                         249
+#define IDC_TOTALGROUP                  250
+#define IDC_MINIMUM                     251
+#define IDC_RECOMMENDED                 252
+#define IDC_CURRENT                     253
+
+#define IDS_DRIVE   1000
+#define IDS_SPACE   1001
+#define IDS_MIN     1002
+#define IDS_REC     1003
+#define IDS_CUR     1004
+
+
+
+
 #endif /* __CPL_RESOURCE_H */
 
 /* EOF */

Modified: trunk/reactos/lib/cpl/sysdm/sysdm.h
--- trunk/reactos/lib/cpl/sysdm/sysdm.h	2006-01-03 18:49:10 UTC (rev 20550)
+++ trunk/reactos/lib/cpl/sysdm/sysdm.h	2006-01-03 21:00:06 UTC (rev 20551)
@@ -22,9 +22,12 @@
 INT_PTR CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 /* environment.c */
-INT_PTR CALLBACK EnvironmentDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
+/* virtmem.c */
+INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
+
 #endif /* __CPL_SYSDM_H */
 
 /* EOF */

Modified: trunk/reactos/lib/cpl/sysdm/sysdm.xml
--- trunk/reactos/lib/cpl/sysdm/sysdm.xml	2006-01-03 18:49:10 UTC (rev 20550)
+++ trunk/reactos/lib/cpl/sysdm/sysdm.xml	2006-01-03 21:00:06 UTC (rev 20551)
@@ -17,5 +17,6 @@
 	<file>hardware.c</file>
 	<file>sysdm.c</file>
 	<file>userprofile.c</file>
+	<file>virtmem.c</file>
 	<file>sysdm.rc</file>
 </module>

Added: trunk/reactos/lib/cpl/sysdm/virtmem.c
--- trunk/reactos/lib/cpl/sysdm/virtmem.c	2006-01-03 18:49:10 UTC (rev 20550)
+++ trunk/reactos/lib/cpl/sysdm/virtmem.c	2006-01-03 21:00:06 UTC (rev 20551)
@@ -0,0 +1,38 @@
+#include <windows.h>
+#include <commctrl.h>
+#include <stdlib.h>
+#include <tchar.h>
+
+#include "resource.h"
+#include "sysdm.h"
+
+
+/* Environment dialog procedure */
+INT_PTR CALLBACK
+VirtMemDlgProc(HWND hwndDlg,
+		   UINT uMsg,
+		   WPARAM wParam,
+		   LPARAM lParam)
+{
+  switch (uMsg)
+  {
+    case WM_INITDIALOG:
+      break;
+
+    case WM_COMMAND:
+      switch (LOWORD(wParam))
+      {
+        case IDCANCEL:
+          EndDialog(hwndDlg, 0);
+          return TRUE;
+      }
+      break;
+
+    case WM_NOTIFY:
+      break;
+  }
+
+  return FALSE;
+}
+
+/* EOF */