Add partial implementation of the environment variables dialog.
authorEric Kohl <eric.kohl@reactos.org>
Fri, 2 Jul 2004 20:28:00 +0000 (20:28 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 2 Jul 2004 20:28:00 +0000 (20:28 +0000)
svn path=/trunk/; revision=9973

reactos/lib/cpl/sysdm/Makefile
reactos/lib/cpl/sysdm/advanced.c
reactos/lib/cpl/sysdm/environment.c [new file with mode: 0644]
reactos/lib/cpl/sysdm/resource.h
reactos/lib/cpl/sysdm/sysdm.h
reactos/lib/cpl/sysdm/sysdm.rc

index 6a480a0..9a6b077 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.3 2004/06/30 10:53:05 ekohl Exp $
+# $Id: Makefile,v 1.4 2004/07/02 20:28:00 ekohl Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -34,7 +34,8 @@ TARGET_PCH =
 
 TARGET_CLEAN = 
 
-TARGET_OBJECTS = sysdm.o general.o computer.o hardware.o advanced.o userprofile.o
+TARGET_OBJECTS = sysdm.o general.o computer.o hardware.o advanced.o userprofile.o\
+                 environment.o
 
 DEP_OBJECTS = $(TARGET_OBJECTS)
 
index c21c1b3..d61039a 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: advanced.c,v 1.2 2004/06/30 10:53:05 ekohl Exp $
+/* $Id: advanced.c,v 1.3 2004/07/02 20:28:00 ekohl Exp $
  *
  * PROJECT:         ReactOS System Control Panel
  * FILE:            lib/cpl/system/advanced.c
@@ -38,8 +38,7 @@ AdvancedPageProc(
   HWND hwndDlg,
   UINT uMsg,
   WPARAM wParam,
-  LPARAM lParam
-)
+  LPARAM lParam)
 {
   switch (uMsg)
   {
@@ -47,6 +46,15 @@ AdvancedPageProc(
       break;
 
     case WM_COMMAND:
+      switch(LOWORD(wParam))
+      {
+        case IDC_ENVVAR:
+          DialogBox(hApplet,
+                    MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
+                    hwndDlg,
+                    EnvironmentDlgProc);
+          break;
+      }
       break;
 
   }
diff --git a/reactos/lib/cpl/sysdm/environment.c b/reactos/lib/cpl/sysdm/environment.c
new file mode 100644 (file)
index 0000000..ad3f357
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+ *  ReactOS
+ *  Copyright (C) 2004 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: environment.c,v 1.1 2004/07/02 20:28:00 ekohl Exp $
+ *
+ * PROJECT:         ReactOS System Control Panel
+ * FILE:            lib/cpl/sysdm/environment.c
+ * PURPOSE:         Environment variable settings
+ * PROGRAMMER:      Eric Kohl
+ */
+
+#include <windows.h>
+#include <commctrl.h>
+#include <stdlib.h>
+#include <tchar.h>
+
+#include "resource.h"
+#include "sysdm.h"
+
+
+static VOID
+SetEnvironmentVariables(HWND hwndListView,
+                       HKEY hRootKey,
+                       LPTSTR lpSubKeyName)
+{
+  HKEY hKey;
+  DWORD dwValues;
+  DWORD dwMaxValueNameLength;
+  DWORD dwMaxValueDataLength;
+  DWORD i;
+  LPTSTR lpName;
+  LPTSTR lpData;
+  LPTSTR lpExpandData;
+  DWORD dwNameLength;
+  DWORD dwDataLength;
+  DWORD dwType;
+
+  LV_ITEM lvi;
+  int nIndex;
+
+  if (RegOpenKeyEx(hRootKey,
+                  lpSubKeyName,
+                  0,
+                  KEY_READ,
+                  &hKey))
+    return;
+
+  if (RegQueryInfoKey(hKey,
+                     NULL,
+                     NULL,
+                     NULL,
+                     NULL,
+                     NULL,
+                     NULL,
+                     &dwValues,
+                     &dwMaxValueNameLength,
+                     &dwMaxValueDataLength,
+                     NULL,
+                     NULL))
+  {
+    RegCloseKey(hKey);
+    return;
+  }
+
+  lpName = GlobalAlloc(GPTR, (dwMaxValueNameLength + 1) * sizeof(TCHAR));
+  if (lpName == NULL)
+  {
+    RegCloseKey(hKey);
+    return;
+  }
+
+  lpData = GlobalAlloc(GPTR, (dwMaxValueDataLength + 1) * sizeof(TCHAR));
+  if (lpData == NULL)
+  {
+    GlobalFree(lpData);
+    RegCloseKey(hKey);
+    return;
+  }
+
+  for (i = 0; i < dwValues; i++)
+  {
+    dwNameLength = dwMaxValueNameLength + 1;
+    dwDataLength = dwMaxValueDataLength + 1;
+    if (RegEnumValue(hKey,
+                    i,
+                    lpName,
+                    &dwNameLength,
+                    NULL,
+                    &dwType,
+                    (LPBYTE)lpData,
+                    &dwDataLength))
+    {
+      GlobalFree(lpName);
+      GlobalFree(lpData);
+      RegCloseKey(hKey);
+      return;
+    }
+
+    if (dwType == REG_EXPAND_SZ)
+    {
+      lpExpandData = GlobalAlloc(GPTR, MAX_PATH * sizeof(TCHAR));
+      if (lpExpandData == NULL)
+      {
+        GlobalFree(lpName);
+        GlobalFree(lpData);
+        RegCloseKey(hKey);
+        return;
+      }
+
+      ExpandEnvironmentStrings(lpData,
+                              lpExpandData,
+                              MAX_PATH);
+    }
+
+    memset(&lvi, 0x00, sizeof(lvi));
+    lvi.mask = LVIF_TEXT | LVIF_STATE;
+    lvi.pszText = lpName;
+    lvi.state=0;
+    nIndex = ListView_InsertItem(hwndListView, &lvi);
+
+    if (dwType == REG_EXPAND_SZ)
+    {
+      ListView_SetItemText(hwndListView, nIndex, 1, lpExpandData);
+      GlobalFree(lpExpandData);
+    }
+    else
+    {
+      ListView_SetItemText(hwndListView, nIndex, 1, lpData);
+    }
+  }
+
+  GlobalFree(lpName);
+  GlobalFree(lpData);
+  RegCloseKey(hKey);
+}
+
+
+static VOID
+SetListViewColumns(HWND hwndListView)
+{
+  RECT rect;
+  LV_COLUMN column;
+
+  GetClientRect(hwndListView, &rect);
+
+  memset(&column, 0x00, sizeof(column));
+  column.mask=LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM|LVCF_TEXT;
+  column.fmt=LVCFMT_LEFT;
+  column.cx = (rect.right - rect.left) / 3;
+  column.iSubItem = 0;
+  column.pszText = _T("Variable");
+  ListView_InsertColumn(hwndListView, 0, &column);
+
+  column.cx = (rect.right - rect.left) - ((rect.right - rect.left) / 3) - 1;
+  column.iSubItem = 1;
+  column.pszText = _T("Value");
+  ListView_InsertColumn(hwndListView, 1, &column);
+}
+
+
+static VOID
+OnInitDialog(HWND hwndDlg)
+{
+  HWND hwndListView;
+
+  /* Set user environment variables */
+  hwndListView = GetDlgItem(hwndDlg, IDC_USER_VARIABLE_LIST);
+
+  SetListViewColumns(hwndListView);
+
+  SetEnvironmentVariables(hwndListView,
+                         HKEY_CURRENT_USER,
+                         _T("Environment"));
+
+  ListView_SetColumnWidth(hwndListView,2,LVSCW_AUTOSIZE_USEHEADER);
+  ListView_Update(hwndListView,0);
+
+
+  /* Set system environment variables */
+  hwndListView = GetDlgItem(hwndDlg, IDC_SYSTEM_VARIABLE_LIST);
+
+  SetListViewColumns(hwndListView);
+
+  SetEnvironmentVariables(hwndListView,
+                         HKEY_LOCAL_MACHINE,
+                         _T("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"));
+
+  ListView_SetColumnWidth(hwndListView,2,LVSCW_AUTOSIZE_USEHEADER);
+  ListView_Update(hwndListView,0);
+}
+
+
+/* Environment dialog procedure */
+BOOL CALLBACK
+EnvironmentDlgProc(HWND hwndDlg,
+                  UINT uMsg,
+                  WPARAM wParam,
+                  LPARAM lParam)
+{
+  switch (uMsg)
+  {
+    case WM_INITDIALOG:
+      OnInitDialog(hwndDlg);
+      break;
+
+    case WM_COMMAND:
+      switch (LOWORD(wParam))
+      {
+        case IDC_USER_VARIABLE_NEW:
+        case IDC_USER_VARIABLE_EDIT:
+        case IDC_USER_VARIABLE_DELETE:
+          break;
+
+        case IDC_SYSTEM_VARIABLE_NEW:
+        case IDC_SYSTEM_VARIABLE_EDIT:
+        case IDC_SYSTEM_VARIABLE_DELETE:
+          break;
+
+        case IDOK:
+          EndDialog(hwndDlg, 0);
+          return TRUE;
+
+        case IDCANCEL:
+          EndDialog(hwndDlg, 0);
+          return TRUE;
+      }
+      break;
+  }
+
+  return FALSE;
+}
+
+/* EOF */
index a6f4ff1..e4d56fb 100644 (file)
@@ -2,12 +2,12 @@
 #define __CPL_RESOURCE_H
 
 /* metrics */
-#define PROPSHEETWIDTH  246
-#define PROPSHEETHEIGHT 228
-#define PROPSHEETPADDING        6
-#define SYSTEM_COLUMN   (18 * PROPSHEETPADDING)
-#define LABELLINE(x)    (((PROPSHEETPADDING + 2) * x) + (x + 2))
-#define ICONSIZE        16
+#define PROPSHEETWIDTH   256
+#define PROPSHEETHEIGHT  218
+#define PROPSHEETPADDING 6
+#define SYSTEM_COLUMN    (18 * PROPSHEETPADDING)
+#define LABELLINE(x)     (((PROPSHEETPADDING + 2) * x) + (x + 2))
+#define ICONSIZE         16
 
 /* ids */
 #define RC_LICENSE      101
 #define IDC_HARDWARE_PROFILE   210
 #define IDC_HARDWARE_DRIVER_SIGN       211
 #define IDC_HARDWARE_DEVICE_MANAGER    212
-#define IDC_USERPROFILE_DELETE 213
-#define IDC_USERPROFILE_CHANGE 214
-#define IDC_USERPROFILE_COPY           215
+
+#define IDC_USERPROFILE_LIST            213
+#define IDC_USERPROFILE_DELETE          214
+#define IDC_USERPROFILE_CHANGE          215
+#define IDC_USERPROFILE_COPY            216
+
+#define IDD_ENVIRONMENT_VARIABLES       105
+#define IDC_USER_VARIABLE_LIST          220
+#define IDC_USER_VARIABLE_NEW           221
+#define IDC_USER_VARIABLE_EDIT          222
+#define IDC_USER_VARIABLE_DELETE        223
+#define IDC_SYSTEM_VARIABLE_LIST        224
+#define IDC_SYSTEM_VARIABLE_NEW         225
+#define IDC_SYSTEM_VARIABLE_EDIT        226
+#define IDC_SYSTEM_VARIABLE_DELETE      227
 
 #endif /* __CPL_RESOURCE_H */
 
index 0fc2615..915203d 100644 (file)
@@ -21,8 +21,8 @@ BOOL CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
 BOOL CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 BOOL CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
-
-//BOOL CALLBACK EnvironmentDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+/* environment.c */
+BOOL CALLBACK EnvironmentDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 
 #endif /* __CPL_SYSDM_H */
index a47bcd2..d9344bd 100644 (file)
@@ -72,9 +72,9 @@ BEGIN
   LTEXT "Workgroup:",IDC_WORKGROUPDOMAIN,PROPSHEETPADDING,LABELLINE(6)-6,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(6)-6
   LTEXT "",IDC_WORKGROUPDOMAIN_NAME,90,LABELLINE(6)-6,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(6)-6
   LTEXT "To use the Network Identfication Wizard to join a domain and create a local user, click Network ID.",-1,PROPSHEETPADDING,LABELLINE(7)+5,PROPSHEETWIDTH-(12*PROPSHEETPADDING)-ICONSIZE,LABELLINE(8)+5
-  PUSHBUTTON "&Network ID",IDC_NETWORK_ID,185,LABELLINE(7)+5,54,LABELLINE(1)+4
+  PUSHBUTTON "&Network ID...",IDC_NETWORK_ID,185,LABELLINE(7)+5,54,LABELLINE(1)+4
   LTEXT "To rename this computer or join a domain, click Properties.",-1,PROPSHEETPADDING,LABELLINE(11)+2,PROPSHEETWIDTH-(12*PROPSHEETPADDING)-ICONSIZE,LABELLINE(12)+2
-  PUSHBUTTON "&Properties",IDC_NETWORK_PROPERTY,185,LABELLINE(11)+2,54,LABELLINE(1)+4
+  PUSHBUTTON "&Properties...",IDC_NETWORK_PROPERTY,185,LABELLINE(11)+2,54,LABELLINE(1)+4
 END
 
 IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@@ -85,18 +85,18 @@ BEGIN
   GROUPBOX "Hardware Wizard",-1,PROPSHEETPADDING,LABELLINE(1),PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
   LTEXT "The Hardware wizard helps you install, uninstall, repair, unplug, eject, and configure your hardware.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
   ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON
-  PUSHBUTTON "&Hardware Wizard",IDC_HARDWARE_WIZARD,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
+  PUSHBUTTON "&Hardware Wizard...",IDC_HARDWARE_WIZARD,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
 
   GROUPBOX "Device Manager",-1,PROPSHEETPADDING,LABELLINE(8)+5,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(7)+2
   ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(10)-3,ICONSIZE, ICONSIZE, SS_ICON
   LTEXT "The Device Manager lists all the hardware devices installed on your computer. Use the Device Manager to change the properties of any device.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(10)-3,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
   
-  PUSHBUTTON "&Device Manager",IDC_HARDWARE_DEVICE_MANAGER,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(13)+2,(15*PROPSHEETPADDING),14
+  PUSHBUTTON "&Device Manager...",IDC_HARDWARE_DEVICE_MANAGER,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(13)+2,(15*PROPSHEETPADDING),14
 
   GROUPBOX "Hardware Profiles",-1,PROPSHEETPADDING,LABELLINE(16)+3,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
   ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(18)-5, ICONSIZE, ICONSIZE, SS_ICON
   LTEXT "Hardware profiles provide a way for you to set up and store different hardware configurations.",0,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(18)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
-  PUSHBUTTON "&Hardware Profiles",IDC_HARDWARE_PROFILE,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(20)+2,(15*PROPSHEETPADDING),14
+  PUSHBUTTON "&Hardware Profiles...",IDC_HARDWARE_PROFILE,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(20)+2,(15*PROPSHEETPADDING),14
 END
 
 IDD_PROPPAGEUSERPROFILE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@@ -106,10 +106,12 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
 BEGIN
   ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING,LABELLINE(1), ICONSIZE, ICONSIZE, SS_ICON
   LTEXT "User profiles contain desktop settings and other information related to your login. A different profile can be created on each computer you use, or you can select a roaming profile that is the same on every computer you use.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(1),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(4)
-  LTEXT "Profiles stored on this computer:",-1,PROPSHEETPADDING,LABELLINE(6),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(6)
-  PUSHBUTTON "Delete",IDC_USERPROFILE_DELETE,PROPSHEETPADDING,LABELLINE(23),60,LABELLINE(1)+2
-  PUSHBUTTON "Change Type",IDC_USERPROFILE_CHANGE,95,LABELLINE(23),60,LABELLINE(1)+2
-  PUSHBUTTON "Copy To",IDC_USERPROFILE_COPY,180,LABELLINE(23),60,LABELLINE(1)+2
+  LTEXT "Profiles stored on this computer:",-1,PROPSHEETPADDING,LABELLINE(6),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(1)
+  CONTROL "",IDC_USERPROFILE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|WS_BORDER|WS_TABSTOP,PROPSHEETPADDING,LABELLINE(8),PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(11),WS_EX_CLIENTEDGE
+  
+  PUSHBUTTON "Delete",IDC_USERPROFILE_DELETE,PROPSHEETPADDING,LABELLINE(20),60,LABELLINE(1)+2
+  PUSHBUTTON "Change Type...",IDC_USERPROFILE_CHANGE,95,LABELLINE(20),60,LABELLINE(1)+2
+  PUSHBUTTON "Copy To...",IDC_USERPROFILE_COPY,180,LABELLINE(20),60,LABELLINE(1)+2
 END
 
 IDD_PROPPAGEADVANCED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@@ -120,15 +122,38 @@ BEGIN
   GROUPBOX "Performance",-1,PROPSHEETPADDING,LABELLINE(1),PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
   ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON
   LTEXT "Performance options control how applications use memory, which affects the speed of your computer.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
-  PUSHBUTTON "&Performance Options",IDC_ENVVAR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
+  PUSHBUTTON "&Performance Options...",IDC_ENVVAR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
   GROUPBOX "Environment Variables",-1,PROPSHEETPADDING,LABELLINE(8)+2,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
   ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(10)-5, ICONSIZE, ICONSIZE, SS_ICON
   LTEXT "Environment variables tell your computer where to find certain types of information.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(10)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(11)
-  PUSHBUTTON "&Environment Variables",IDC_ENVVAR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(12)+2,(15*PROPSHEETPADDING),14
+  PUSHBUTTON "&Environment Variables...",IDC_ENVVAR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(12)+2,(15*PROPSHEETPADDING),14
   GROUPBOX "Startup and Recovery",-1,PROPSHEETPADDING,LABELLINE(15)+3,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
   ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(17)-5, ICONSIZE, ICONSIZE, SS_ICON
   LTEXT "Startup and recovery options tell your computer how to start and what to do if an error causes your computer to stop.",0,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(17)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
-  PUSHBUTTON "&Startup and Recovery",IDC_STAREC,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(19)+2,(15*PROPSHEETPADDING),14
+  PUSHBUTTON "&Startup and Recovery...",IDC_STAREC,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(19)+2,(15*PROPSHEETPADDING),14
+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"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+  GROUPBOX "User variables",-1,7,12,238,100
+  LTEXT "&Variables:",-1,14,24,224,8
+  CONTROL "",IDC_USER_VARIABLE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|LVS_NOSORTHEADER|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP,14,35,224,48,WS_EX_CLIENTEDGE
+  PUSHBUTTON "&New...",IDC_USER_VARIABLE_NEW,80,90,50,14
+  PUSHBUTTON "&Edit...",IDC_USER_VARIABLE_EDIT,134,90,50,14
+  PUSHBUTTON "&Delete",IDC_USER_VARIABLE_DELETE,188,90,50,14
+
+  GROUPBOX "System variables",-1,7,116,238,100
+  LTEXT "V&ariables:",410,14,128,224,8
+  CONTROL "",IDC_SYSTEM_VARIABLE_LIST,"SysListView32",LVS_REPORT|LVS_SINGLESEL|LVS_SHOWSELALWAYS|LVS_SORTASCENDING|LVS_NOSORTHEADER|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP,14,139,224,48,WS_EX_CLIENTEDGE
+  PUSHBUTTON "Ne&w...",IDC_SYSTEM_VARIABLE_NEW,80,194,50,14
+  PUSHBUTTON "Ed&it...",IDC_SYSTEM_VARIABLE_EDIT,134,194,50,14
+  PUSHBUTTON "De&lete",IDC_SYSTEM_VARIABLE_DELETE,188,194,50,14
+
+  DEFPUSHBUTTON "OK",IDOK,141,224,50,14,WS_GROUP
+  PUSHBUTTON "Cancel",IDCANCEL,195,224,50,14
 END
 
 STRINGTABLE