did some work on msconfig
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 13 Nov 2005 20:58:29 +0000 (20:58 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 13 Nov 2005 20:58:29 +0000 (20:58 +0000)
svn path=/trunk/; revision=19212

13 files changed:
reactos/subsys/system/msconfig/De.rc
reactos/subsys/system/msconfig/En.rc
reactos/subsys/system/msconfig/freeldrpage.c [new file with mode: 0644]
reactos/subsys/system/msconfig/freeldrpage.h [new file with mode: 0644]
reactos/subsys/system/msconfig/generalpage.c [new file with mode: 0644]
reactos/subsys/system/msconfig/generalpage.h [new file with mode: 0644]
reactos/subsys/system/msconfig/msconfig.c
reactos/subsys/system/msconfig/msconfig.xml
reactos/subsys/system/msconfig/precomp.h
reactos/subsys/system/msconfig/resource.h
reactos/subsys/system/msconfig/srvpage.c
reactos/subsys/system/msconfig/systempage.c [new file with mode: 0644]
reactos/subsys/system/msconfig/systempage.h [new file with mode: 0644]

index c1f14e8..bbf4254 100644 (file)
@@ -27,18 +27,23 @@ IDD_STARTUP_PAGE DIALOG DISCARDABLE  0, 0, 362, 175
 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "Tahoma"
 BEGIN
-    CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168
+    CONTROL         "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
+    PUSHBUTTON      "Alle &aktivieren",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14
+    PUSHBUTTON      "Alle &deaktivieren",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14
 END
 
 IDD_SERVICES_PAGE DIALOG DISCARDABLE  0, 0, 362, 175
 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "Tahoma"
 BEGIN
-    CONTROL "List1",IDC_SERVICES_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168
+    CONTROL         "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148
+    PUSHBUTTON      "Alle &aktivieren",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14
+    PUSHBUTTON      "Alle &deaktivieren",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14
 END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_MSCONFIG             "Systemkonfigurationsprogramm"
     IDS_TAB_GENERAL          "Allgemein"
     IDS_TAB_SYSTEM           "SYSTEM.INI"
     IDS_TAB_FREELDR          "FREELDR.INI"   
@@ -87,7 +92,7 @@ STRINGTABLE DISCARDABLE
 BEGIN
     IDS_SERVICES_STATUS_RUNNING "Gestartet"
     IDS_SERVICES_STATUS_STOPPED "Beendet"
-    IDS_YES "Ja"
-    IDS_NO  "Nein"
+    IDS_SERVICES_YES "Ja"
+    IDS_SERVICES_UNKNOWN "Unbekannt" 
 END
 
index 91e09a7..30ffbcf 100644 (file)
@@ -18,7 +18,9 @@ IDD_STARTUP_PAGE DIALOG DISCARDABLE  0, 0, 362, 175
 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "Tahoma"
 BEGIN
-    CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168
+    CONTROL         "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
+    PUSHBUTTON      "&Activate all",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14
+    PUSHBUTTON      "&Deactivate all",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14
 END
 
 IDD_TOOLS_PAGE DIALOG DISCARDABLE  0, 0, 362, 175
@@ -34,11 +36,14 @@ IDD_SERVICES_PAGE DIALOG DISCARDABLE  0, 0, 362, 175
 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
 FONT 8, "Tahoma"
 BEGIN
-    CONTROL "List1",IDC_SERVICES_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168
+    CONTROL         "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148
+    PUSHBUTTON      "&Activate all",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14
+    PUSHBUTTON      "&Deactivate all",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14
 END
 
 STRINGTABLE DISCARDABLE
 BEGIN
+    IDS_MSCONFIG             "Systemkonfigurationsprogramm"
     IDS_TAB_GENERAL          "General"
     IDS_TAB_SYSTEM           "SYSTEM.INI"
     IDS_TAB_FREELDR          "FREELDR.INI"   
@@ -86,6 +91,6 @@ STRINGTABLE DISCARDABLE
 BEGIN
     IDS_SERVICES_STATUS_RUNNING "Running"
     IDS_SERVICES_STATUS_STOPPED "Stopped"
-    IDS_YES "Yes"
-    IDS_NO  "No"
+    IDS_SERVICES_YES "Yes"
+    IDS_SERVICES_UNKNOWN "Unknown" 
 END
diff --git a/reactos/subsys/system/msconfig/freeldrpage.c b/reactos/subsys/system/msconfig/freeldrpage.c
new file mode 100644 (file)
index 0000000..a6d84d5
--- /dev/null
@@ -0,0 +1,17 @@
+#include <precomp.h>
+
+HWND hFreeLdrPage;
+HWND hFreeLdrDialog;
+
+INT_PTR CALLBACK
+FreeLdrPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    switch (message) {
+    case WM_INITDIALOG:
+        hFreeLdrDialog = hDlg;
+           SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
+               return TRUE;
+       }
+
+  return 0;
+}
diff --git a/reactos/subsys/system/msconfig/freeldrpage.h b/reactos/subsys/system/msconfig/freeldrpage.h
new file mode 100644 (file)
index 0000000..6e0331b
--- /dev/null
@@ -0,0 +1,3 @@
+extern HWND hFreeLdrPage;
+
+INT_PTR CALLBACK FreeLdrPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
diff --git a/reactos/subsys/system/msconfig/generalpage.c b/reactos/subsys/system/msconfig/generalpage.c
new file mode 100644 (file)
index 0000000..ed5454c
--- /dev/null
@@ -0,0 +1,17 @@
+#include <precomp.h>
+
+HWND hGeneralPage;
+HWND hGeneralDialog;
+
+INT_PTR CALLBACK
+GeneralPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    switch (message) {
+    case WM_INITDIALOG:
+        hGeneralDialog = hDlg;
+           SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
+               return TRUE;
+       }
+
+  return 0;
+}
diff --git a/reactos/subsys/system/msconfig/generalpage.h b/reactos/subsys/system/msconfig/generalpage.h
new file mode 100644 (file)
index 0000000..408c404
--- /dev/null
@@ -0,0 +1,3 @@
+extern HWND hGeneralPage;
+
+INT_PTR CALLBACK GeneralPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
index aeb5ff4..a3be400 100644 (file)
@@ -12,9 +12,15 @@ BOOL OnCreate(HWND hWnd)
        TCITEM  item;
 
        hTabWnd = GetDlgItem(hWnd, IDC_TAB);
-    hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, ToolsPageWndProc);
+    hGeneralPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_GENERAL_PAGE), hWnd, GeneralPageWndProc);
+    hSystemPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SYSTEM_PAGE), hWnd, SystemPageWndProc);
+    hFreeLdrPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FREELDR_PAGE), hWnd, FreeLdrPageWndProc);
     hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, ServicesPageWndProc);
     hStartupPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_STARTUP_PAGE), hWnd, StartupPageWndProc);
+    hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, ToolsPageWndProc);
+
+    LoadString(hInst, IDS_MSCONFIG, szTemp, 256);
+    SetWindowText(hWnd, szTemp);
 
        // Insert Tab Pages
        LoadString(hInst, IDS_TAB_GENERAL, szTemp, 256);
@@ -61,45 +67,57 @@ void MsConfig_OnTabWndSelChange(void)
 {
     switch (TabCtrl_GetCurSel(hTabWnd)) {
     case 0: //General
-        ShowWindow(hToolsPage, SW_HIDE);
-               ShowWindow(hStartupPage, SW_HIDE);
-               //ShowWindow(hFreeLdrPage, SW_HIDE);
+        ShowWindow(hGeneralPage, SW_SHOW);
+        ShowWindow(hSystemPage, SW_HIDE);
+               ShowWindow(hFreeLdrPage, SW_HIDE);
                ShowWindow(hServicesPage, SW_HIDE);
-        //BringWindowToTop(hFreeLdrPage);
+               ShowWindow(hStartupPage, SW_HIDE);
+        ShowWindow(hToolsPage, SW_HIDE);
+        BringWindowToTop(hGeneralPage);
                break;
     case 1: //SYSTEM.INI
+        ShowWindow(hGeneralPage, SW_HIDE);
+        ShowWindow(hSystemPage, SW_SHOW);
         ShowWindow(hToolsPage, SW_HIDE);
                ShowWindow(hStartupPage, SW_HIDE);
-               //ShowWindow(hFreeLdrPage, SW_SHOW);
+               ShowWindow(hFreeLdrPage, SW_HIDE);
                ShowWindow(hServicesPage, SW_HIDE);
-        //BringWindowToTop(hFreeLdrPage);
+        BringWindowToTop(hSystemPage);
                break;
     case 2: //Freeldr
-        ShowWindow(hToolsPage, SW_HIDE);
-               ShowWindow(hStartupPage, SW_HIDE);
-               //ShowWindow(hFreeLdrPage, SW_SHOW);
+        ShowWindow(hGeneralPage, SW_HIDE);
+        ShowWindow(hSystemPage, SW_HIDE);
+               ShowWindow(hFreeLdrPage, SW_SHOW);
                ShowWindow(hServicesPage, SW_HIDE);
-        //BringWindowToTop(hFreeLdrPage);
+               ShowWindow(hStartupPage, SW_HIDE);
+        ShowWindow(hToolsPage, SW_HIDE);
+        BringWindowToTop(hFreeLdrPage);
                break;
     case 3: //Services
-        ShowWindow(hToolsPage, SW_HIDE);
-               ShowWindow(hStartupPage, SW_HIDE);
-               //ShowWindow(hFreeLdrPage, SW_HIDE);
+        ShowWindow(hGeneralPage, SW_HIDE);
+        ShowWindow(hSystemPage, SW_HIDE);
+               ShowWindow(hFreeLdrPage, SW_HIDE);
                ShowWindow(hServicesPage, SW_SHOW);
+               ShowWindow(hStartupPage, SW_HIDE);
+        ShowWindow(hToolsPage, SW_HIDE);
         BringWindowToTop(hServicesPage);
                break;
     case 4: //startup
-        ShowWindow(hToolsPage, SW_HIDE);
-               ShowWindow(hStartupPage, SW_SHOW);
-               //ShowWindow(hFreeLdrPage, SW_HIDE);
+        ShowWindow(hGeneralPage, SW_HIDE);
+        ShowWindow(hSystemPage, SW_HIDE);
+               ShowWindow(hFreeLdrPage, SW_HIDE);
                ShowWindow(hServicesPage, SW_HIDE);
+               ShowWindow(hStartupPage, SW_SHOW);
+        ShowWindow(hToolsPage, SW_HIDE);
         BringWindowToTop(hStartupPage);
                break;
        case 5: //Tools
-        ShowWindow(hToolsPage, SW_SHOW);
-               ShowWindow(hStartupPage, SW_HIDE);
-               //ShowWindow(hFreeLdrPage, SW_HIDE);
+        ShowWindow(hGeneralPage, SW_HIDE);
+        ShowWindow(hSystemPage, SW_HIDE);
+               ShowWindow(hFreeLdrPage, SW_HIDE);
                ShowWindow(hServicesPage, SW_HIDE);
+               ShowWindow(hStartupPage, SW_HIDE);
+        ShowWindow(hToolsPage, SW_SHOW);
         BringWindowToTop(hToolsPage);
                break;
        }
@@ -145,6 +163,8 @@ MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
                DestroyWindow(hToolsPage);
                DestroyWindow(hServicesPage);
                DestroyWindow(hStartupPage);
+        DestroyWindow(hFreeLdrPage);
+        DestroyWindow(hSystemPage);
         return DefWindowProc(hDlg, message, wParam, lParam);
 
     }
index 223233d..0aaa07c 100644 (file)
        <library>shell32</library>
        <file>toolspage.c</file>
        <file>srvpage.c</file>
+       <file>systempage.c</file>
        <file>startuppage.c</file>
+       <file>freeldrpage.c</file>
+       <file>generalpage.c</file>
        <file>msconfig.c</file>
        <file>msconfig.rc</file>
 </module>
index a9d6454..056a48e 100644 (file)
@@ -9,6 +9,9 @@
 #include "toolspage.h"
 #include "srvpage.h"
 #include "startuppage.h"
+#include "freeldrpage.h"
+#include "systempage.h"
+#include "generalpage.h"
 
 #define MAX_KEY_LENGTH 255
 #define MAX_VALUE_NAME 16383
index e2dbf99..6877800 100644 (file)
@@ -3,6 +3,8 @@
 #define IDD_SERVICES_PAGE                103
 #define IDD_GENERAL_PAGE                 104
 #define IDD_STARTUP_PAGE                 105
+#define IDD_FREELDR_PAGE                 106
+#define IDD_SYSTEM_PAGE                  107
 
 #define IDC_TAB                         1001
 #define IDC_BTN_APPLY                   1002
 #define IDC_SERVICES_LIST               1006
 #define IDC_TOOLS_LIST                  1007
 #define IDC_STARTUP_LIST                1008
+#define IDC_BTN_SERVICES_ACTIVATE       1009
+#define IDC_BTN_SERVICES_DEACTIVATE     1010
+#define IDC_BTN_STARTUP_ACTIVATE        1011
+#define IDC_BTN_STARTUP_DEACTIVATE      1012
 
 #define IDS_TAB_TOOLS                   2001
 #define IDS_TAB_SYSTEM                  2002
@@ -52,6 +58,9 @@
 
 #define IDS_SERVICES_STATUS_STOPPED     2200
 #define IDS_SERVICES_STATUS_RUNNING     2201
-#define IDS_YES                         2202
-#define IDS_NO                          2203
+#define IDS_SERVICES_YES                2202
+#define IDS_SERVICES_UNKNOWN            2203
+
+#define IDS_MSCONFIG                    3000
+
 /* EOF */
index e81cad6..4bc1f49 100644 (file)
@@ -149,7 +149,7 @@ GetServices ( void )
                     {
                         if (pServiceFailureActions->lpsaActions[0].Type == SC_ACTION_REBOOT)
                         {
-                            LoadString(hInst, IDS_YES, szStatus, 128);
+                            LoadString(hInst, IDS_SERVICES_YES, szStatus, 128);
                             item.pszText = szStatus;
                             item.iSubItem = 1;
                             SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
@@ -211,7 +211,14 @@ GetServices ( void )
                             item.pszText = lpBuffer;
                             item.iSubItem = 2;
                             SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
-                        }
+                        }  
+                    }
+                    else
+                    {
+                        LoadString(hInst, IDS_SERVICES_UNKNOWN, szStatus, 128);
+                        item.pszText = szStatus;
+                        item.iSubItem = 2;
+                        SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
                     }
                     CloseServiceHandle(hService);
                 }
diff --git a/reactos/subsys/system/msconfig/systempage.c b/reactos/subsys/system/msconfig/systempage.c
new file mode 100644 (file)
index 0000000..316f196
--- /dev/null
@@ -0,0 +1,17 @@
+#include <precomp.h>
+
+HWND hSystemPage;
+HWND hSystemDialog;
+
+INT_PTR CALLBACK
+SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    switch (message) {
+    case WM_INITDIALOG:
+        hSystemDialog = hDlg;
+           SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
+               return TRUE;
+       }
+
+  return 0;
+}
diff --git a/reactos/subsys/system/msconfig/systempage.h b/reactos/subsys/system/msconfig/systempage.h
new file mode 100644 (file)
index 0000000..d928c77
--- /dev/null
@@ -0,0 +1,3 @@
+extern HWND hSystemPage;
+
+INT_PTR CALLBACK SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);