Skeleton dialog box to control system page file size
authorGed Murphy <gedmurphy@reactos.org>
Tue, 3 Jan 2006 21:00:06 +0000 (21:00 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Tue, 3 Jan 2006 21:00:06 +0000 (21:00 +0000)
svn path=/trunk/; revision=20551

reactos/lib/cpl/sysdm/advanced.c
reactos/lib/cpl/sysdm/en.rc
reactos/lib/cpl/sysdm/resource.h
reactos/lib/cpl/sysdm/sysdm.h
reactos/lib/cpl/sysdm/sysdm.xml
reactos/lib/cpl/sysdm/virtmem.c [new file with mode: 0644]

index f76e6a2..488ec40 100644 (file)
@@ -48,6 +48,13 @@ AdvancedPageProc(
     case WM_COMMAND:
       switch(LOWORD(wParam))
       {
     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),
         case IDC_ENVVAR:
           DialogBox(hApplet,
                     MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
@@ -60,4 +67,3 @@ AdvancedPageProc(
   }
   return FALSE;
 }
   }
   return FALSE;
 }
-
index cc65785..14793b4 100644 (file)
@@ -93,6 +93,34 @@ BEGIN
   PUSHBUTTON "&Startup and Recovery...",IDC_STAREC,PROPSHEETWIDTH-(20*PROPSHEETPADDING),LABELLINE(19)+2,(18*PROPSHEETPADDING),14
 END
 
   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"
 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 @@ BEGIN
 END
 
 
 END
 
 
-STRINGTABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
   IDS_CPLSYSTEMNAME "System"
   IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings."
 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
 END
index c3dac63..8e476ab 100644 (file)
 #define ICONSIZE         16
 
 /* ids */
 #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 */
 
 /* controls */
-#define IDC_LICENSEMEMO 101
+#define IDC_LICENSEMEMO                 101
 #define IDC_PROCESSORMANUFACTURER       102
 #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_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_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_USERPROFILE_LIST            213
 #define IDC_USERPROFILE_DELETE          214
 
 #define IDC_USERPROFILE_LIST            213
 #define IDC_USERPROFILE_DELETE          214
 #define IDC_VARIABLE_NAME               230
 #define IDC_VARIABLE_VALUE              231
 
 #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 */
 #endif /* __CPL_RESOURCE_H */
 
 /* EOF */
index a4003d7..1bf21fc 100644 (file)
@@ -22,7 +22,10 @@ INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
 INT_PTR CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 /* environment.c */
 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 */
 
 
 #endif /* __CPL_SYSDM_H */
index 5770540..af84204 100644 (file)
@@ -17,5 +17,6 @@
        <file>hardware.c</file>
        <file>sysdm.c</file>
        <file>userprofile.c</file>
        <file>hardware.c</file>
        <file>sysdm.c</file>
        <file>userprofile.c</file>
+       <file>virtmem.c</file>
        <file>sysdm.rc</file>
 </module>
        <file>sysdm.rc</file>
 </module>
diff --git a/reactos/lib/cpl/sysdm/virtmem.c b/reactos/lib/cpl/sysdm/virtmem.c
new file mode 100644 (file)
index 0000000..40b047d
--- /dev/null
@@ -0,0 +1,38 @@
+#include <windows.h>\r
+#include <commctrl.h>\r
+#include <stdlib.h>\r
+#include <tchar.h>\r
+\r
+#include "resource.h"\r
+#include "sysdm.h"\r
+\r
+\r
+/* Environment dialog procedure */\r
+INT_PTR CALLBACK\r
+VirtMemDlgProc(HWND hwndDlg,\r
+                  UINT uMsg,\r
+                  WPARAM wParam,\r
+                  LPARAM lParam)\r
+{\r
+  switch (uMsg)\r
+  {\r
+    case WM_INITDIALOG:\r
+      break;\r
+\r
+    case WM_COMMAND:\r
+      switch (LOWORD(wParam))\r
+      {\r
+        case IDCANCEL:\r
+          EndDialog(hwndDlg, 0);\r
+          return TRUE;\r
+      }\r
+      break;\r
+\r
+    case WM_NOTIFY:\r
+      break;\r
+  }\r
+\r
+  return FALSE;\r
+}\r
+\r
+/* EOF */\r