From 703d635153b4547e69582624166d4543dbd39b9d Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sun, 16 Oct 2005 23:01:01 +0000 Subject: [PATCH] set eol-style:native svn path=/trunk/; revision=18505 --- reactos/subsys/system/msconfig/De.rc | 142 ++++----- reactos/subsys/system/msconfig/En.rc | 140 ++++----- reactos/subsys/system/msconfig/msconfig.c | 304 ++++++++++---------- reactos/subsys/system/msconfig/msconfig.h | 4 +- reactos/subsys/system/msconfig/msconfig.rc | 36 +-- reactos/subsys/system/msconfig/msconfig.xml | 32 +-- reactos/subsys/system/msconfig/precomp.h | 22 +- reactos/subsys/system/msconfig/resource.h | 94 +++--- reactos/subsys/system/msconfig/srvpage.c | 100 +++---- reactos/subsys/system/msconfig/srvpage.h | 8 +- reactos/subsys/system/msconfig/toolspage.c | 248 ++++++++-------- reactos/subsys/system/msconfig/toolspage.h | 10 +- 12 files changed, 570 insertions(+), 570 deletions(-) diff --git a/reactos/subsys/system/msconfig/De.rc b/reactos/subsys/system/msconfig/De.rc index c9524b17b52..e178b5c74c6 100644 --- a/reactos/subsys/system/msconfig/De.rc +++ b/reactos/subsys/system/msconfig/De.rc @@ -1,71 +1,71 @@ -LANGUAGE LANG_GERMAN, SUBLANG_GERMAN - -IDD_MSCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 378, 220 -STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -CAPTION "Systemkonfigurationsprogramm" -FONT 8, "Tahoma" -BEGIN - CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 - DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Hilfe", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Abbrechen", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Ü&bernehmen", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP -END - -IDD_TOOLS_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 -STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "Tahoma" -BEGIN - CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 - EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY - PUSHBUTTON "&Ausführen", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP -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 | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168 -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_TAB_GENERAL "Allgemein" - IDS_TAB_FREELDR "FREELDR.INI" - IDS_TAB_SERVICES "Dienste" - IDS_TAB_STARTUP "Systemstart" - IDS_TAB_TOOLS "Tools" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_SERVICES_COLUMN_SERVICE "Dienst" - IDS_SERVICES_COLUMN_VENDOR "Hersteller" - IDS_SERVICES_COLUMN_STATUS "Status" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_TOOLS_COLUMN_NAME "Name" - IDS_TOOLS_COLUMN_DESCR "Beschreibung" - - IDS_TOOLS_CMD_NAME "Konsole" - IDS_TOOLS_CMD_DESCR "Öffnet die Eingabeaufforderung." - IDS_TOOLS_CMD_CMD "cmd.exe" - IDS_TOOLS_CMD_PARAM "" - - IDS_TOOLS_INFO_NAME "Version" - IDS_TOOLS_INFO_DESCR "Zeigt die installierte ReactOS Version an." - IDS_TOOLS_INFO_CMD "winver.exe" - - IDS_TOOLS_REGEDIT_NAME "Registrierungs-Editor" - IDS_TOOLS_REGEDIT_DESCR "Öffnet den Registrierungs-Editor." - IDS_TOOLS_REGEDIT_CMD "regedit.exe" - - IDS_TOOLS_SYSDM_NAME "Systemeigenschaften" - IDS_TOOLS_SYSDM_DESCR "Zeigt Informationen über diesen Rechner an." - IDS_TOOLS_SYSDM_CMD "control" - IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" -END +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN + +IDD_MSCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 378, 220 +STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | + WS_THICKFRAME +CAPTION "Systemkonfigurationsprogramm" +FONT 8, "Tahoma" +BEGIN + CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 + DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Hilfe", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Abbrechen", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Ü&bernehmen", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_TOOLS_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "Tahoma" +BEGIN + CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 + EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY + PUSHBUTTON "&Ausführen", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +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 | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TAB_GENERAL "Allgemein" + IDS_TAB_FREELDR "FREELDR.INI" + IDS_TAB_SERVICES "Dienste" + IDS_TAB_STARTUP "Systemstart" + IDS_TAB_TOOLS "Tools" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERVICES_COLUMN_SERVICE "Dienst" + IDS_SERVICES_COLUMN_VENDOR "Hersteller" + IDS_SERVICES_COLUMN_STATUS "Status" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLS_COLUMN_NAME "Name" + IDS_TOOLS_COLUMN_DESCR "Beschreibung" + + IDS_TOOLS_CMD_NAME "Konsole" + IDS_TOOLS_CMD_DESCR "Öffnet die Eingabeaufforderung." + IDS_TOOLS_CMD_CMD "cmd.exe" + IDS_TOOLS_CMD_PARAM "" + + IDS_TOOLS_INFO_NAME "Version" + IDS_TOOLS_INFO_DESCR "Zeigt die installierte ReactOS Version an." + IDS_TOOLS_INFO_CMD "winver.exe" + + IDS_TOOLS_REGEDIT_NAME "Registrierungs-Editor" + IDS_TOOLS_REGEDIT_DESCR "Öffnet den Registrierungs-Editor." + IDS_TOOLS_REGEDIT_CMD "regedit.exe" + + IDS_TOOLS_SYSDM_NAME "Systemeigenschaften" + IDS_TOOLS_SYSDM_DESCR "Zeigt Informationen über diesen Rechner an." + IDS_TOOLS_SYSDM_CMD "control" + IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" +END diff --git a/reactos/subsys/system/msconfig/En.rc b/reactos/subsys/system/msconfig/En.rc index bb721f1c534..7a933b6c1f4 100644 --- a/reactos/subsys/system/msconfig/En.rc +++ b/reactos/subsys/system/msconfig/En.rc @@ -1,70 +1,70 @@ -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -IDD_MSCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 378, 220 -STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -CAPTION "Systemkonfigurationsprogramm" -FONT 8, "Tahoma" -BEGIN - CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 - DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Help", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Apply", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP -END - -IDD_TOOLS_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 -STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "Tahoma" -BEGIN - CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 - EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY - PUSHBUTTON "&Run", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP -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 | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168 -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_TAB_GENERAL "General" - IDS_TAB_FREELDR "FREELDR.INI" - IDS_TAB_SERVICES "Services" - IDS_TAB_STARTUP "Startup" - IDS_TAB_TOOLS "Tools" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_SERVICES_COLUMN_SERVICE "Service" - IDS_SERVICES_COLUMN_VENDOR "Vendor" - IDS_SERVICES_COLUMN_STATUS "Status" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_TOOLS_COLUMN_NAME "Name" - IDS_TOOLS_COLUMN_DESCR "Description" - - IDS_TOOLS_CMD_NAME "Console" - IDS_TOOLS_CMD_DESCR "" - IDS_TOOLS_CMD_CMD "cmd.exe" - - IDS_TOOLS_INFO_NAME "Version" - IDS_TOOLS_INFO_DESCR "Displays version information." - IDS_TOOLS_INFO_CMD "winver.exe" - - IDS_TOOLS_REGEDIT_NAME "Registry-Editor" - IDS_TOOLS_REGEDIT_DESCR "Opens the Registry-Editor." - IDS_TOOLS_REGEDIT_CMD "regedit.exe" - - IDS_TOOLS_SYSDM_NAME "Systemproperties" - IDS_TOOLS_SYSDM_DESCR "Shows information about this computer." - IDS_TOOLS_SYSDM_CMD "control" - IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" -END +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +IDD_MSCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 378, 220 +STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | + WS_THICKFRAME +CAPTION "Systemkonfigurationsprogramm" +FONT 8, "Tahoma" +BEGIN + CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 + DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Help", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Apply", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_TOOLS_PAGE DIALOG DISCARDABLE 0, 0, 362, 175 +STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "Tahoma" +BEGIN + CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 + EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY + PUSHBUTTON "&Run", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +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 | WS_BORDER | WS_TABSTOP, 2, 1, 360, 168 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TAB_GENERAL "General" + IDS_TAB_FREELDR "FREELDR.INI" + IDS_TAB_SERVICES "Services" + IDS_TAB_STARTUP "Startup" + IDS_TAB_TOOLS "Tools" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_SERVICES_COLUMN_SERVICE "Service" + IDS_SERVICES_COLUMN_VENDOR "Vendor" + IDS_SERVICES_COLUMN_STATUS "Status" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLS_COLUMN_NAME "Name" + IDS_TOOLS_COLUMN_DESCR "Description" + + IDS_TOOLS_CMD_NAME "Console" + IDS_TOOLS_CMD_DESCR "" + IDS_TOOLS_CMD_CMD "cmd.exe" + + IDS_TOOLS_INFO_NAME "Version" + IDS_TOOLS_INFO_DESCR "Displays version information." + IDS_TOOLS_INFO_CMD "winver.exe" + + IDS_TOOLS_REGEDIT_NAME "Registry-Editor" + IDS_TOOLS_REGEDIT_DESCR "Opens the Registry-Editor." + IDS_TOOLS_REGEDIT_CMD "regedit.exe" + + IDS_TOOLS_SYSDM_NAME "Systemproperties" + IDS_TOOLS_SYSDM_DESCR "Shows information about this computer." + IDS_TOOLS_SYSDM_CMD "control" + IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" +END diff --git a/reactos/subsys/system/msconfig/msconfig.c b/reactos/subsys/system/msconfig/msconfig.c index 554648dc7f1..6a3cf928fa9 100644 --- a/reactos/subsys/system/msconfig/msconfig.c +++ b/reactos/subsys/system/msconfig/msconfig.c @@ -1,152 +1,152 @@ -#include - -HINSTANCE hInst = 0; - -HWND hMainWnd; /* Main Window */ -HWND hTabWnd; /* Tab Control Window */ - - -BOOL OnCreate(HWND hWnd) -{ - TCHAR szTemp[256]; - TCITEM item; - - hTabWnd = GetDlgItem(hWnd, IDC_TAB); - hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, ToolsPageWndProc); - hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, ServicesPageWndProc); - - // Insert Tab Pages - LoadString(hInst, IDS_TAB_GENERAL, szTemp, 256); - memset(&item, 0, sizeof(TCITEM)); - item.mask = TCIF_TEXT; - item.pszText = szTemp; - TabCtrl_InsertItem(hTabWnd, 0, &item); - - LoadString(hInst, IDS_TAB_FREELDR, szTemp, 256); - memset(&item, 0, sizeof(TCITEM)); - item.mask = TCIF_TEXT; - item.pszText = szTemp; - TabCtrl_InsertItem(hTabWnd, 1, &item); - - LoadString(hInst, IDS_TAB_SERVICES, szTemp, 256); - memset(&item, 0, sizeof(TCITEM)); - item.mask = TCIF_TEXT; - item.pszText = szTemp; - TabCtrl_InsertItem(hTabWnd, 2, &item); - - LoadString(hInst, IDS_TAB_STARTUP, szTemp, 256); - memset(&item, 0, sizeof(TCITEM)); - item.mask = TCIF_TEXT; - item.pszText = szTemp; - TabCtrl_InsertItem(hTabWnd, 3, &item); - - LoadString(hInst, IDS_TAB_TOOLS, szTemp, 256); - memset(&item, 0, sizeof(TCITEM)); - item.mask = TCIF_TEXT; - item.pszText = szTemp; - TabCtrl_InsertItem(hTabWnd, 4, &item); - - return TRUE; -} - - -void MsConfig_OnTabWndSelChange(void) -{ - switch (TabCtrl_GetCurSel(hTabWnd)) { - case 0: - ShowWindow(hToolsPage, SW_HIDE); - //ShowWindow(hFreeLdrPage, SW_SHOW); - ShowWindow(hServicesPage, SW_HIDE); - //BringWindowToTop(hFreeLdrPage); - break; - case 1: - ShowWindow(hToolsPage, SW_HIDE); - //ShowWindow(hFreeLdrPage, SW_SHOW); - ShowWindow(hServicesPage, SW_HIDE); - //BringWindowToTop(hFreeLdrPage); - break; - case 2: - ShowWindow(hToolsPage, SW_HIDE); - //ShowWindow(hFreeLdrPage, SW_HIDE); - ShowWindow(hServicesPage, SW_SHOW); - //BringWindowToTop(hFreeLdrPage); - break; - case 3: - ShowWindow(hToolsPage, SW_HIDE); - //ShowWindow(hFreeLdrPage, SW_HIDE); - ShowWindow(hServicesPage, SW_HIDE); - //BringWindowToTop(hFreeLdrPage); - break; - case 4: - ShowWindow(hToolsPage, SW_SHOW); - //ShowWindow(hFreeLdrPage, SW_HIDE); - ShowWindow(hServicesPage, SW_HIDE); - BringWindowToTop(hToolsPage); - break; - } -} - - -/* Message handler for dialog box. */ -INT_PTR CALLBACK -MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - int idctrl; - LPNMHDR pnmh; - - switch (message) { - case WM_INITDIALOG: - hMainWnd = hDlg; - return OnCreate(hDlg); - - case WM_COMMAND: - - if (LOWORD(wParam) == IDOK) { - //MsConfig_OnSaveChanges(); - } - - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { - EndDialog(hDlg, LOWORD(wParam)); - return TRUE; - } - break; - - case WM_NOTIFY: - idctrl = (int)wParam; - pnmh = (LPNMHDR)lParam; - if ((pnmh->hwndFrom == hTabWnd) && - (pnmh->idFrom == IDC_TAB) && - (pnmh->code == TCN_SELCHANGE)) - { - MsConfig_OnTabWndSelChange(); - } - break; - - case WM_DESTROY: - return DefWindowProc(hDlg, message, wParam, lParam); - - } - - return 0; -} - -int APIENTRY WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) -{ - - INITCOMMONCONTROLSEX InitControls; - - InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX); - InitControls.dwICC = ICC_TAB_CLASSES | ICC_LISTVIEW_CLASSES; - InitCommonControlsEx(&InitControls); - - hInst = hInstance; - - DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, MsConfigWndProc); - - return 0; -} - -/* EOF */ +#include + +HINSTANCE hInst = 0; + +HWND hMainWnd; /* Main Window */ +HWND hTabWnd; /* Tab Control Window */ + + +BOOL OnCreate(HWND hWnd) +{ + TCHAR szTemp[256]; + TCITEM item; + + hTabWnd = GetDlgItem(hWnd, IDC_TAB); + hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, ToolsPageWndProc); + hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, ServicesPageWndProc); + + // Insert Tab Pages + LoadString(hInst, IDS_TAB_GENERAL, szTemp, 256); + memset(&item, 0, sizeof(TCITEM)); + item.mask = TCIF_TEXT; + item.pszText = szTemp; + TabCtrl_InsertItem(hTabWnd, 0, &item); + + LoadString(hInst, IDS_TAB_FREELDR, szTemp, 256); + memset(&item, 0, sizeof(TCITEM)); + item.mask = TCIF_TEXT; + item.pszText = szTemp; + TabCtrl_InsertItem(hTabWnd, 1, &item); + + LoadString(hInst, IDS_TAB_SERVICES, szTemp, 256); + memset(&item, 0, sizeof(TCITEM)); + item.mask = TCIF_TEXT; + item.pszText = szTemp; + TabCtrl_InsertItem(hTabWnd, 2, &item); + + LoadString(hInst, IDS_TAB_STARTUP, szTemp, 256); + memset(&item, 0, sizeof(TCITEM)); + item.mask = TCIF_TEXT; + item.pszText = szTemp; + TabCtrl_InsertItem(hTabWnd, 3, &item); + + LoadString(hInst, IDS_TAB_TOOLS, szTemp, 256); + memset(&item, 0, sizeof(TCITEM)); + item.mask = TCIF_TEXT; + item.pszText = szTemp; + TabCtrl_InsertItem(hTabWnd, 4, &item); + + return TRUE; +} + + +void MsConfig_OnTabWndSelChange(void) +{ + switch (TabCtrl_GetCurSel(hTabWnd)) { + case 0: + ShowWindow(hToolsPage, SW_HIDE); + //ShowWindow(hFreeLdrPage, SW_SHOW); + ShowWindow(hServicesPage, SW_HIDE); + //BringWindowToTop(hFreeLdrPage); + break; + case 1: + ShowWindow(hToolsPage, SW_HIDE); + //ShowWindow(hFreeLdrPage, SW_SHOW); + ShowWindow(hServicesPage, SW_HIDE); + //BringWindowToTop(hFreeLdrPage); + break; + case 2: + ShowWindow(hToolsPage, SW_HIDE); + //ShowWindow(hFreeLdrPage, SW_HIDE); + ShowWindow(hServicesPage, SW_SHOW); + //BringWindowToTop(hFreeLdrPage); + break; + case 3: + ShowWindow(hToolsPage, SW_HIDE); + //ShowWindow(hFreeLdrPage, SW_HIDE); + ShowWindow(hServicesPage, SW_HIDE); + //BringWindowToTop(hFreeLdrPage); + break; + case 4: + ShowWindow(hToolsPage, SW_SHOW); + //ShowWindow(hFreeLdrPage, SW_HIDE); + ShowWindow(hServicesPage, SW_HIDE); + BringWindowToTop(hToolsPage); + break; + } +} + + +/* Message handler for dialog box. */ +INT_PTR CALLBACK +MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + int idctrl; + LPNMHDR pnmh; + + switch (message) { + case WM_INITDIALOG: + hMainWnd = hDlg; + return OnCreate(hDlg); + + case WM_COMMAND: + + if (LOWORD(wParam) == IDOK) { + //MsConfig_OnSaveChanges(); + } + + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + } + break; + + case WM_NOTIFY: + idctrl = (int)wParam; + pnmh = (LPNMHDR)lParam; + if ((pnmh->hwndFrom == hTabWnd) && + (pnmh->idFrom == IDC_TAB) && + (pnmh->code == TCN_SELCHANGE)) + { + MsConfig_OnTabWndSelChange(); + } + break; + + case WM_DESTROY: + return DefWindowProc(hDlg, message, wParam, lParam); + + } + + return 0; +} + +int APIENTRY WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow) +{ + + INITCOMMONCONTROLSEX InitControls; + + InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX); + InitControls.dwICC = ICC_TAB_CLASSES | ICC_LISTVIEW_CLASSES; + InitCommonControlsEx(&InitControls); + + hInst = hInstance; + + DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, MsConfigWndProc); + + return 0; +} + +/* EOF */ diff --git a/reactos/subsys/system/msconfig/msconfig.h b/reactos/subsys/system/msconfig/msconfig.h index d8c36c73392..4a4554668a2 100644 --- a/reactos/subsys/system/msconfig/msconfig.h +++ b/reactos/subsys/system/msconfig/msconfig.h @@ -1,2 +1,2 @@ -extern HINSTANCE hInst; - +extern HINSTANCE hInst; + diff --git a/reactos/subsys/system/msconfig/msconfig.rc b/reactos/subsys/system/msconfig/msconfig.rc index f5f93bc25f0..9a9ca1c7d6c 100644 --- a/reactos/subsys/system/msconfig/msconfig.rc +++ b/reactos/subsys/system/msconfig/msconfig.rc @@ -1,18 +1,18 @@ -#include -#include - -#include "resource.h" - - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Systemconfiguration Tool\0" -#define REACTOS_STR_INTERNAL_NAME "msconfig\0" -#define REACTOS_STR_ORIGINAL_FILENAME "msconfig.exe\0" -#include - - -#include "De.rc" -#include "En.rc" - +#include +#include + +#include "resource.h" + + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Systemconfiguration Tool\0" +#define REACTOS_STR_INTERNAL_NAME "msconfig\0" +#define REACTOS_STR_ORIGINAL_FILENAME "msconfig.exe\0" +#include + + +#include "De.rc" +#include "En.rc" + diff --git a/reactos/subsys/system/msconfig/msconfig.xml b/reactos/subsys/system/msconfig/msconfig.xml index 2631be19e17..10ff3987ed4 100644 --- a/reactos/subsys/system/msconfig/msconfig.xml +++ b/reactos/subsys/system/msconfig/msconfig.xml @@ -1,16 +1,16 @@ - - . - - - - - 0x600 - 0x501 - kernel32 - user32 - comctl32 - toolspage.c - srvpage.c - msconfig.c - msconfig.rc - + + . + + + + + 0x600 + 0x501 + kernel32 + user32 + comctl32 + toolspage.c + srvpage.c + msconfig.c + msconfig.rc + diff --git a/reactos/subsys/system/msconfig/precomp.h b/reactos/subsys/system/msconfig/precomp.h index 8532faba9cf..cf1e6c94acb 100644 --- a/reactos/subsys/system/msconfig/precomp.h +++ b/reactos/subsys/system/msconfig/precomp.h @@ -1,11 +1,11 @@ -#include -#define NTOS_MODE_USER -#include -#include -#include - -#include "resource.h" -#include "msconfig.h" -#include "toolspage.h" -#include "srvpage.h" - +#include +#define NTOS_MODE_USER +#include +#include +#include + +#include "resource.h" +#include "msconfig.h" +#include "toolspage.h" +#include "srvpage.h" + diff --git a/reactos/subsys/system/msconfig/resource.h b/reactos/subsys/system/msconfig/resource.h index 87cda4092fd..2e067a261d2 100644 --- a/reactos/subsys/system/msconfig/resource.h +++ b/reactos/subsys/system/msconfig/resource.h @@ -1,47 +1,47 @@ -#define IDD_MSCONFIG_DIALOG 101 -#define IDD_TOOLS_PAGE 102 -#define IDD_SERVICES_PAGE 103 -#define IDD_GENERAL_PAGE 104 -#define IDD_STARTUP_PAGE 105 - -#define IDC_TAB 1001 -#define IDC_BTN_APPLY 1002 -#define IDC_BTN_HELP 1003 -#define IDC_TOOLS_CMDLINE 1004 -#define IDC_BTN_RUN 1005 -#define IDC_SERVICES_LIST 1006 -#define IDC_TOOLS_LIST 1007 - -#define IDS_TAB_TOOLS 2001 -#define IDS_TAB_FREELDR 2002 -#define IDS_TAB_STARTUP 2003 -#define IDS_TAB_SERVICES 2004 -#define IDS_TAB_GENERAL 2005 - -#define IDS_TOOLS_COLUMN_NAME 2010 -#define IDS_TOOLS_COLUMN_DESCR 2011 -#define IDS_SERVICES_COLUMN_SERVICE 2012 -#define IDS_SERVICES_COLUMN_VENDOR 2013 -#define IDS_SERVICES_COLUMN_STATUS 2014 - -#define IDS_TOOLS_CMD_NAME 2100 -#define IDS_TOOLS_CMD_DESCR 2101 -#define IDS_TOOLS_CMD_CMD 2102 -#define IDS_TOOLS_CMD_PARAM 2103 - -#define IDS_TOOLS_INFO_NAME 2104 -#define IDS_TOOLS_INFO_DESCR 2105 -#define IDS_TOOLS_INFO_CMD 2106 -#define IDS_TOOLS_INFO_PARAM 2107 - -#define IDS_TOOLS_REGEDIT_NAME 2108 -#define IDS_TOOLS_REGEDIT_DESCR 2109 -#define IDS_TOOLS_REGEDIT_CMD 2110 -#define IDS_TOOLS_REGEDIT_PARAM 2111 - -#define IDS_TOOLS_SYSDM_NAME 2112 -#define IDS_TOOLS_SYSDM_DESCR 2113 -#define IDS_TOOLS_SYSDM_CMD 2114 -#define IDS_TOOLS_SYSDM_PARAM 2115 - -/* EOF */ +#define IDD_MSCONFIG_DIALOG 101 +#define IDD_TOOLS_PAGE 102 +#define IDD_SERVICES_PAGE 103 +#define IDD_GENERAL_PAGE 104 +#define IDD_STARTUP_PAGE 105 + +#define IDC_TAB 1001 +#define IDC_BTN_APPLY 1002 +#define IDC_BTN_HELP 1003 +#define IDC_TOOLS_CMDLINE 1004 +#define IDC_BTN_RUN 1005 +#define IDC_SERVICES_LIST 1006 +#define IDC_TOOLS_LIST 1007 + +#define IDS_TAB_TOOLS 2001 +#define IDS_TAB_FREELDR 2002 +#define IDS_TAB_STARTUP 2003 +#define IDS_TAB_SERVICES 2004 +#define IDS_TAB_GENERAL 2005 + +#define IDS_TOOLS_COLUMN_NAME 2010 +#define IDS_TOOLS_COLUMN_DESCR 2011 +#define IDS_SERVICES_COLUMN_SERVICE 2012 +#define IDS_SERVICES_COLUMN_VENDOR 2013 +#define IDS_SERVICES_COLUMN_STATUS 2014 + +#define IDS_TOOLS_CMD_NAME 2100 +#define IDS_TOOLS_CMD_DESCR 2101 +#define IDS_TOOLS_CMD_CMD 2102 +#define IDS_TOOLS_CMD_PARAM 2103 + +#define IDS_TOOLS_INFO_NAME 2104 +#define IDS_TOOLS_INFO_DESCR 2105 +#define IDS_TOOLS_INFO_CMD 2106 +#define IDS_TOOLS_INFO_PARAM 2107 + +#define IDS_TOOLS_REGEDIT_NAME 2108 +#define IDS_TOOLS_REGEDIT_DESCR 2109 +#define IDS_TOOLS_REGEDIT_CMD 2110 +#define IDS_TOOLS_REGEDIT_PARAM 2111 + +#define IDS_TOOLS_SYSDM_NAME 2112 +#define IDS_TOOLS_SYSDM_DESCR 2113 +#define IDS_TOOLS_SYSDM_CMD 2114 +#define IDS_TOOLS_SYSDM_PARAM 2115 + +/* EOF */ diff --git a/reactos/subsys/system/msconfig/srvpage.c b/reactos/subsys/system/msconfig/srvpage.c index 8c50561206d..6422403b47a 100644 --- a/reactos/subsys/system/msconfig/srvpage.c +++ b/reactos/subsys/system/msconfig/srvpage.c @@ -1,50 +1,50 @@ -#include - -HWND hServicesPage; -HWND hServicesListCtrl; -HWND hServicesDialog; - -INT_PTR CALLBACK -ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - LV_COLUMN column; - TCHAR szTemp[256]; - - switch (message) { - case WM_INITDIALOG: - - hServicesListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST); - hServicesDialog = hDlg; - - DWORD dwStyle; - dwStyle = SendMessage(hServicesListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); - dwStyle = dwStyle | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES; - SendMessage(hServicesListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); - - SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); - - // Initialize the application page's controls - column.mask = LVCF_TEXT | LVCF_WIDTH; - - LoadString(hInst, IDS_SERVICES_COLUMN_SERVICE, szTemp, 256); - column.pszText = szTemp; - column.cx = 150; - ListView_InsertColumn(hServicesListCtrl, 0, &column); - - column.mask = LVCF_TEXT | LVCF_WIDTH; - LoadString(hInst, IDS_SERVICES_COLUMN_VENDOR, szTemp, 256); - column.pszText = szTemp; - column.cx = 200; - ListView_InsertColumn(hServicesListCtrl, 1, &column); - - column.mask = LVCF_TEXT | LVCF_WIDTH; - LoadString(hInst, IDS_SERVICES_COLUMN_STATUS, szTemp, 256); - column.pszText = szTemp; - column.cx = 70; - ListView_InsertColumn(hServicesListCtrl, 1, &column); - - return TRUE; - } - - return 0; -} +#include + +HWND hServicesPage; +HWND hServicesListCtrl; +HWND hServicesDialog; + +INT_PTR CALLBACK +ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + LV_COLUMN column; + TCHAR szTemp[256]; + + switch (message) { + case WM_INITDIALOG: + + hServicesListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST); + hServicesDialog = hDlg; + + DWORD dwStyle; + dwStyle = SendMessage(hServicesListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); + dwStyle = dwStyle | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES; + SendMessage(hServicesListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); + + SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); + + // Initialize the application page's controls + column.mask = LVCF_TEXT | LVCF_WIDTH; + + LoadString(hInst, IDS_SERVICES_COLUMN_SERVICE, szTemp, 256); + column.pszText = szTemp; + column.cx = 150; + ListView_InsertColumn(hServicesListCtrl, 0, &column); + + column.mask = LVCF_TEXT | LVCF_WIDTH; + LoadString(hInst, IDS_SERVICES_COLUMN_VENDOR, szTemp, 256); + column.pszText = szTemp; + column.cx = 200; + ListView_InsertColumn(hServicesListCtrl, 1, &column); + + column.mask = LVCF_TEXT | LVCF_WIDTH; + LoadString(hInst, IDS_SERVICES_COLUMN_STATUS, szTemp, 256); + column.pszText = szTemp; + column.cx = 70; + ListView_InsertColumn(hServicesListCtrl, 1, &column); + + return TRUE; + } + + return 0; +} diff --git a/reactos/subsys/system/msconfig/srvpage.h b/reactos/subsys/system/msconfig/srvpage.h index 9128ff44c39..89c8f3e6112 100644 --- a/reactos/subsys/system/msconfig/srvpage.h +++ b/reactos/subsys/system/msconfig/srvpage.h @@ -1,4 +1,4 @@ -extern HWND hServicesPage; -extern HWND hServicesListCtrl; - -INT_PTR CALLBACK ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +extern HWND hServicesPage; +extern HWND hServicesListCtrl; + +INT_PTR CALLBACK ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); diff --git a/reactos/subsys/system/msconfig/toolspage.c b/reactos/subsys/system/msconfig/toolspage.c index fef4e2acec9..475e82df319 100644 --- a/reactos/subsys/system/msconfig/toolspage.c +++ b/reactos/subsys/system/msconfig/toolspage.c @@ -1,124 +1,124 @@ -#include - -HWND hToolsPage; -HWND hToolsListCtrl; -HWND hToolsDialog; - -void AddItem ( DWORD, DWORD, DWORD, DWORD ); -void FillListView ( void ); - -DWORD ListItems_Cmds[20]; -DWORD ListItems_Params[20]; - -void AddItem ( DWORD name_id, DWORD descr_id, DWORD cmd_id , DWORD param_id ) { - TCHAR szTemp[256]; - LV_ITEM item; - - LoadString(hInst, name_id, szTemp, 256); - memset(&item, 0, sizeof(LV_ITEM)); - item.mask = LVIF_TEXT; - item.iImage = 0; - item.pszText = szTemp; - item.iItem = ListView_GetItemCount(hToolsListCtrl); - item.lParam = 0; - ListView_InsertItem(hToolsListCtrl, &item); - - ListItems_Cmds[item.iItem] = cmd_id; - ListItems_Params[item.iItem] = param_id; - - LoadString(hInst, descr_id, szTemp, 256); - item.pszText = szTemp; - item.iSubItem = 1; - SendMessage(hToolsListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); -} - -void FillListView ( void ) { - AddItem(IDS_TOOLS_CMD_NAME, IDS_TOOLS_CMD_DESCR, IDS_TOOLS_CMD_CMD, IDS_TOOLS_CMD_PARAM); - AddItem(IDS_TOOLS_REGEDIT_NAME, IDS_TOOLS_REGEDIT_DESCR, IDS_TOOLS_REGEDIT_CMD,IDS_TOOLS_REGEDIT_PARAM); - AddItem(IDS_TOOLS_SYSDM_NAME, IDS_TOOLS_SYSDM_DESCR, IDS_TOOLS_SYSDM_CMD, IDS_TOOLS_SYSDM_PARAM); - AddItem(IDS_TOOLS_INFO_NAME, IDS_TOOLS_INFO_DESCR, IDS_TOOLS_INFO_CMD, IDS_TOOLS_INFO_PARAM); -} - -INT_PTR CALLBACK -ToolsPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - LV_COLUMN column; - TCHAR szTemp[256]; - TCHAR szTemp2[256]; - LPNMITEMACTIVATE lpnmitem; - LPNMHDR nmh; - - switch (message) { - case WM_INITDIALOG: - - hToolsListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST); - hToolsDialog = hDlg; - - DWORD dwStyle; - dwStyle = SendMessage(hToolsListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); - dwStyle = dwStyle | LVS_EX_FULLROWSELECT; - SendMessage(hToolsListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); - - SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); - - // Initialize the application page's controls - column.mask = LVCF_TEXT | LVCF_WIDTH; - - LoadString(hInst, IDS_TOOLS_COLUMN_NAME, szTemp, 256); - column.pszText = szTemp; - column.cx = 150; - ListView_InsertColumn(hToolsListCtrl, 0, &column); - - column.mask = LVCF_TEXT | LVCF_WIDTH; - LoadString(hInst, IDS_TOOLS_COLUMN_DESCR, szTemp, 256); - column.pszText = szTemp; - column.cx = 500; - ListView_InsertColumn(hToolsListCtrl, 1, &column); - - FillListView(); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_BTN_RUN: - if (ListView_GetSelectionMark(hToolsListCtrl) != -1) { - LoadString(hInst, ListItems_Cmds[ListView_GetSelectionMark(hToolsListCtrl)], szTemp, 256); - LoadString(hInst, ListItems_Params[ListView_GetSelectionMark(hToolsListCtrl)], szTemp2, 256); - ShellExecute(0, _T("open"), szTemp, szTemp2, _T(""), SW_NORMAL); - } - } - break; - - case WM_NOTIFY: - nmh = (LPNMHDR) lParam; - if (nmh->hwndFrom == hToolsListCtrl) - { - switch (nmh->code) - { - case NM_CLICK: - lpnmitem = (LPNMITEMACTIVATE) lParam; - if (lpnmitem->iItem > -1) { - LoadString(hInst, ListItems_Cmds[lpnmitem->iItem], szTemp, 256); - LoadString(hInst, ListItems_Params[lpnmitem->iItem], szTemp2, 256); - _tcscat(szTemp, _T(" ")); - _tcscat(szTemp, szTemp2); - SendDlgItemMessage(hToolsDialog, IDC_TOOLS_CMDLINE, WM_SETTEXT, 0, (LPARAM) szTemp); - } - break; - case NM_DBLCLK: - lpnmitem = (LPNMITEMACTIVATE) lParam; - if (lpnmitem->iItem > -1) { - LoadString(hInst, ListItems_Cmds[lpnmitem->iItem], szTemp, 256); - LoadString(hInst, ListItems_Params[lpnmitem->iItem], szTemp2, 256); - ShellExecute(0, _T("open"), szTemp, szTemp2, _T(""), SW_NORMAL); - } - break; - } - } - break; - } - - return 0; -} - +#include + +HWND hToolsPage; +HWND hToolsListCtrl; +HWND hToolsDialog; + +void AddItem ( DWORD, DWORD, DWORD, DWORD ); +void FillListView ( void ); + +DWORD ListItems_Cmds[20]; +DWORD ListItems_Params[20]; + +void AddItem ( DWORD name_id, DWORD descr_id, DWORD cmd_id , DWORD param_id ) { + TCHAR szTemp[256]; + LV_ITEM item; + + LoadString(hInst, name_id, szTemp, 256); + memset(&item, 0, sizeof(LV_ITEM)); + item.mask = LVIF_TEXT; + item.iImage = 0; + item.pszText = szTemp; + item.iItem = ListView_GetItemCount(hToolsListCtrl); + item.lParam = 0; + ListView_InsertItem(hToolsListCtrl, &item); + + ListItems_Cmds[item.iItem] = cmd_id; + ListItems_Params[item.iItem] = param_id; + + LoadString(hInst, descr_id, szTemp, 256); + item.pszText = szTemp; + item.iSubItem = 1; + SendMessage(hToolsListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); +} + +void FillListView ( void ) { + AddItem(IDS_TOOLS_CMD_NAME, IDS_TOOLS_CMD_DESCR, IDS_TOOLS_CMD_CMD, IDS_TOOLS_CMD_PARAM); + AddItem(IDS_TOOLS_REGEDIT_NAME, IDS_TOOLS_REGEDIT_DESCR, IDS_TOOLS_REGEDIT_CMD,IDS_TOOLS_REGEDIT_PARAM); + AddItem(IDS_TOOLS_SYSDM_NAME, IDS_TOOLS_SYSDM_DESCR, IDS_TOOLS_SYSDM_CMD, IDS_TOOLS_SYSDM_PARAM); + AddItem(IDS_TOOLS_INFO_NAME, IDS_TOOLS_INFO_DESCR, IDS_TOOLS_INFO_CMD, IDS_TOOLS_INFO_PARAM); +} + +INT_PTR CALLBACK +ToolsPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + LV_COLUMN column; + TCHAR szTemp[256]; + TCHAR szTemp2[256]; + LPNMITEMACTIVATE lpnmitem; + LPNMHDR nmh; + + switch (message) { + case WM_INITDIALOG: + + hToolsListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST); + hToolsDialog = hDlg; + + DWORD dwStyle; + dwStyle = SendMessage(hToolsListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); + dwStyle = dwStyle | LVS_EX_FULLROWSELECT; + SendMessage(hToolsListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); + + SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); + + // Initialize the application page's controls + column.mask = LVCF_TEXT | LVCF_WIDTH; + + LoadString(hInst, IDS_TOOLS_COLUMN_NAME, szTemp, 256); + column.pszText = szTemp; + column.cx = 150; + ListView_InsertColumn(hToolsListCtrl, 0, &column); + + column.mask = LVCF_TEXT | LVCF_WIDTH; + LoadString(hInst, IDS_TOOLS_COLUMN_DESCR, szTemp, 256); + column.pszText = szTemp; + column.cx = 500; + ListView_InsertColumn(hToolsListCtrl, 1, &column); + + FillListView(); + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_BTN_RUN: + if (ListView_GetSelectionMark(hToolsListCtrl) != -1) { + LoadString(hInst, ListItems_Cmds[ListView_GetSelectionMark(hToolsListCtrl)], szTemp, 256); + LoadString(hInst, ListItems_Params[ListView_GetSelectionMark(hToolsListCtrl)], szTemp2, 256); + ShellExecute(0, _T("open"), szTemp, szTemp2, _T(""), SW_NORMAL); + } + } + break; + + case WM_NOTIFY: + nmh = (LPNMHDR) lParam; + if (nmh->hwndFrom == hToolsListCtrl) + { + switch (nmh->code) + { + case NM_CLICK: + lpnmitem = (LPNMITEMACTIVATE) lParam; + if (lpnmitem->iItem > -1) { + LoadString(hInst, ListItems_Cmds[lpnmitem->iItem], szTemp, 256); + LoadString(hInst, ListItems_Params[lpnmitem->iItem], szTemp2, 256); + _tcscat(szTemp, _T(" ")); + _tcscat(szTemp, szTemp2); + SendDlgItemMessage(hToolsDialog, IDC_TOOLS_CMDLINE, WM_SETTEXT, 0, (LPARAM) szTemp); + } + break; + case NM_DBLCLK: + lpnmitem = (LPNMITEMACTIVATE) lParam; + if (lpnmitem->iItem > -1) { + LoadString(hInst, ListItems_Cmds[lpnmitem->iItem], szTemp, 256); + LoadString(hInst, ListItems_Params[lpnmitem->iItem], szTemp2, 256); + ShellExecute(0, _T("open"), szTemp, szTemp2, _T(""), SW_NORMAL); + } + break; + } + } + break; + } + + return 0; +} + diff --git a/reactos/subsys/system/msconfig/toolspage.h b/reactos/subsys/system/msconfig/toolspage.h index 00f5db21909..daa938fec80 100644 --- a/reactos/subsys/system/msconfig/toolspage.h +++ b/reactos/subsys/system/msconfig/toolspage.h @@ -1,5 +1,5 @@ -extern HWND hToolsPage; -extern HWND hToolsListCtrl; - -INT_PTR CALLBACK ToolsPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); - +extern HWND hToolsPage; +extern HWND hToolsListCtrl; + +INT_PTR CALLBACK ToolsPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +