Author: cwittich
Date: Tue Aug 29 17:01:47 2006
New Revision: 23769
URL:
http://svn.reactos.org/svn/reactos?rev=23769&view=rev
Log:
fix indentation
Modified:
trunk/reactos/base/applications/msconfig/freeldrpage.c
trunk/reactos/base/applications/msconfig/generalpage.c
trunk/reactos/base/applications/msconfig/msconfig.c
trunk/reactos/base/applications/msconfig/srvpage.c
trunk/reactos/base/applications/msconfig/startuppage.c
trunk/reactos/base/applications/msconfig/systempage.c
trunk/reactos/base/applications/msconfig/toolspage.c
Modified: trunk/reactos/base/applications/msconfig/freeldrpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/freeldrpage.c (original)
+++ trunk/reactos/base/applications/msconfig/freeldrpage.c Tue Aug 29 17:01:47 2006
@@ -21,9 +21,8 @@
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;
+ SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOSIZE | SWP_NOZORDER);
+ return TRUE;
+ }
+ return 0;
}
Modified: trunk/reactos/base/applications/msconfig/generalpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/generalpage.c (original)
+++ trunk/reactos/base/applications/msconfig/generalpage.c Tue Aug 29 17:01:47 2006
@@ -21,9 +21,8 @@
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;
+ SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOSIZE | SWP_NOZORDER);
+ return TRUE;
+ }
+ return 0;
}
Modified: trunk/reactos/base/applications/msconfig/msconfig.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/msconfig.c (original)
+++ trunk/reactos/base/applications/msconfig/msconfig.c Tue Aug 29 17:01:47 2006
@@ -17,10 +17,10 @@
BOOL OnCreate(HWND hWnd)
{
- TCHAR szTemp[256];
- TCITEM item;
-
- hTabWnd = GetDlgItem(hWnd, IDC_TAB);
+ TCHAR szTemp[256];
+ TCITEM item;
+
+ hTabWnd = GetDlgItem(hWnd, IDC_TAB);
hGeneralPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_GENERAL_PAGE), hWnd, (DLGPROC)
GeneralPageWndProc);
hSystemPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SYSTEM_PAGE), hWnd, (DLGPROC)
SystemPageWndProc);
hFreeLdrPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FREELDR_PAGE), hWnd, (DLGPROC)
FreeLdrPageWndProc);
@@ -31,38 +31,38 @@
LoadString(hInst, IDS_MSCONFIG, szTemp, 256);
SetWindowText(hWnd, szTemp);
- // Insert Tab Pages
- LoadString(hInst, IDS_TAB_GENERAL, szTemp, 256);
+ // Insert Tab Pages
+ LoadString(hInst, IDS_TAB_GENERAL, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 0, &item);
- LoadString(hInst, IDS_TAB_SYSTEM, szTemp, 256);
+ LoadString(hInst, IDS_TAB_SYSTEM, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 1, &item);
- LoadString(hInst, IDS_TAB_FREELDR, szTemp, 256);
+ LoadString(hInst, IDS_TAB_FREELDR, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 2, &item);
- LoadString(hInst, IDS_TAB_SERVICES, szTemp, 256);
+ LoadString(hInst, IDS_TAB_SERVICES, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 3, &item);
- LoadString(hInst, IDS_TAB_STARTUP, szTemp, 256);
+ LoadString(hInst, IDS_TAB_STARTUP, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 4, &item);
- LoadString(hInst, IDS_TAB_TOOLS, szTemp, 256);
+ LoadString(hInst, IDS_TAB_TOOLS, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
@@ -70,7 +70,7 @@
MsConfig_OnTabWndSelChange();
- return TRUE;
+ return TRUE;
}
@@ -80,58 +80,58 @@
case 0: //General
ShowWindow(hGeneralPage, SW_SHOW);
ShowWindow(hSystemPage, SW_HIDE);
- ShowWindow(hFreeLdrPage, SW_HIDE);
- ShowWindow(hServicesPage, SW_HIDE);
- ShowWindow(hStartupPage, SW_HIDE);
+ ShowWindow(hFreeLdrPage, SW_HIDE);
+ ShowWindow(hServicesPage, SW_HIDE);
+ ShowWindow(hStartupPage, SW_HIDE);
ShowWindow(hToolsPage, SW_HIDE);
BringWindowToTop(hGeneralPage);
- break;
+ break;
case 1: //SYSTEM.INI
ShowWindow(hGeneralPage, SW_HIDE);
ShowWindow(hSystemPage, SW_SHOW);
ShowWindow(hToolsPage, SW_HIDE);
- ShowWindow(hStartupPage, SW_HIDE);
- ShowWindow(hFreeLdrPage, SW_HIDE);
- ShowWindow(hServicesPage, SW_HIDE);
+ ShowWindow(hStartupPage, SW_HIDE);
+ ShowWindow(hFreeLdrPage, SW_HIDE);
+ ShowWindow(hServicesPage, SW_HIDE);
BringWindowToTop(hSystemPage);
break;
case 2: //Freeldr
ShowWindow(hGeneralPage, SW_HIDE);
ShowWindow(hSystemPage, SW_HIDE);
- ShowWindow(hFreeLdrPage, SW_SHOW);
- ShowWindow(hServicesPage, SW_HIDE);
- ShowWindow(hStartupPage, SW_HIDE);
+ ShowWindow(hFreeLdrPage, SW_SHOW);
+ ShowWindow(hServicesPage, SW_HIDE);
+ ShowWindow(hStartupPage, SW_HIDE);
ShowWindow(hToolsPage, SW_HIDE);
BringWindowToTop(hFreeLdrPage);
- break;
+ break;
case 3: //Services
ShowWindow(hGeneralPage, SW_HIDE);
ShowWindow(hSystemPage, SW_HIDE);
- ShowWindow(hFreeLdrPage, SW_HIDE);
- ShowWindow(hServicesPage, SW_SHOW);
- ShowWindow(hStartupPage, SW_HIDE);
+ ShowWindow(hFreeLdrPage, SW_HIDE);
+ ShowWindow(hServicesPage, SW_SHOW);
+ ShowWindow(hStartupPage, SW_HIDE);
ShowWindow(hToolsPage, SW_HIDE);
BringWindowToTop(hServicesPage);
- break;
+ break;
case 4: //startup
ShowWindow(hGeneralPage, SW_HIDE);
ShowWindow(hSystemPage, SW_HIDE);
- ShowWindow(hFreeLdrPage, SW_HIDE);
- ShowWindow(hServicesPage, SW_HIDE);
- ShowWindow(hStartupPage, SW_SHOW);
+ ShowWindow(hFreeLdrPage, SW_HIDE);
+ ShowWindow(hServicesPage, SW_HIDE);
+ ShowWindow(hStartupPage, SW_SHOW);
ShowWindow(hToolsPage, SW_HIDE);
BringWindowToTop(hStartupPage);
- break;
- case 5: //Tools
- ShowWindow(hGeneralPage, SW_HIDE);
- ShowWindow(hSystemPage, SW_HIDE);
- ShowWindow(hFreeLdrPage, SW_HIDE);
- ShowWindow(hServicesPage, SW_HIDE);
- ShowWindow(hStartupPage, SW_HIDE);
+ break;
+ case 5: //Tools
+ 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;
- }
+ break;
+ }
}
@@ -142,43 +142,44 @@
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:
- DestroyWindow(hToolsPage);
- DestroyWindow(hGeneralPage);
- DestroyWindow(hServicesPage);
- DestroyWindow(hStartupPage);
- DestroyWindow(hFreeLdrPage);
- DestroyWindow(hSystemPage);
- return DefWindowProc(hDlg, message, wParam, lParam);
-
+ 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:
+ DestroyWindow(hToolsPage);
+ DestroyWindow(hGeneralPage);
+ DestroyWindow(hServicesPage);
+ DestroyWindow(hStartupPage);
+ DestroyWindow(hFreeLdrPage);
+ DestroyWindow(hSystemPage);
+ return DefWindowProc(hDlg, message, wParam, lParam);
}
return 0;
Modified: trunk/reactos/base/applications/msconfig/srvpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/srvpage.c (original)
+++ trunk/reactos/base/applications/msconfig/srvpage.c Tue Aug 29 17:01:47 2006
@@ -18,9 +18,9 @@
INT_PTR CALLBACK
ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
- LV_COLUMN column;
- TCHAR szTemp[256];
- DWORD dwStyle;
+ LV_COLUMN column;
+ TCHAR szTemp[256];
+ DWORD dwStyle;
UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam);
@@ -35,7 +35,7 @@
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);
+ 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;
@@ -64,10 +64,10 @@
(void)ListView_InsertColumn(hServicesListCtrl, 3, &column);
GetServices();
- return TRUE;
- }
-
- return 0;
+ return TRUE;
+ }
+
+ return 0;
}
void
@@ -106,7 +106,7 @@
/* reserve memory for service info array */
pServiceStatus = (ENUM_SERVICE_STATUS_PROCESS *)
HeapAlloc(GetProcessHeap(), 0, BytesNeeded);
if (!pServiceStatus)
- return;
+ return;
/* fill array with service info */
if (EnumServicesStatusEx(ScHandle, SC_ENUM_PROCESS_INFO, SERVICE_WIN32,
SERVICE_STATE_ALL, (LPBYTE)pServiceStatus, BytesNeeded, &BytesNeeded,
&NumServices, &ResumeHandle, 0) == 0)
@@ -146,7 +146,7 @@
{
pServiceFailureActions = (LPSERVICE_FAILURE_ACTIONS)
HeapAlloc(GetProcessHeap(), 0, BytesNeeded);
if (pServiceFailureActions == NULL)
- return;
+ return;
if (!QueryServiceConfig2(hService,
SERVICE_CONFIG_FAILURE_ACTIONS, (LPBYTE)pServiceFailureActions, BytesNeeded,
&BytesNeeded))
{
@@ -170,11 +170,11 @@
}
}
- if (pServiceFailureActions != NULL)
- {
- HeapFree(GetProcessHeap(), 0, pServiceFailureActions);
- pServiceFailureActions = NULL;
- }
+ if (pServiceFailureActions != NULL)
+ {
+ HeapFree(GetProcessHeap(), 0, pServiceFailureActions);
+ pServiceFailureActions = NULL;
+ }
/* get vendor of service binary */
BytesNeeded = 0;
@@ -184,7 +184,7 @@
{
pServiceConfig = (LPQUERY_SERVICE_CONFIG)
HeapAlloc(GetProcessHeap(), 0, BytesNeeded);
if (pServiceConfig == NULL)
- return;
+ return;
if (!QueryServiceConfig(hService, pServiceConfig,
BytesNeeded, &BytesNeeded))
{
@@ -208,20 +208,21 @@
_tcscpy(FileName, pServiceConfig->lpBinaryPathName);
}
- HeapFree(GetProcessHeap(), 0, pServiceConfig);
- pServiceConfig = NULL;
-
- dwLen = GetFileVersionInfoSize(FileName, &dwHandle);
+ HeapFree(GetProcessHeap(), 0, pServiceConfig);
+ pServiceConfig = NULL;
+
+ dwLen = GetFileVersionInfoSize(FileName, &dwHandle);
if (dwLen)
{
lpData = (TCHAR*) HeapAlloc(GetProcessHeap(), 0, dwLen);
if (lpData == NULL)
- return;
-
- if (!GetFileVersionInfo (FileName, dwHandle, dwLen, lpData)) {
- HeapFree(GetProcessHeap(), 0, lpData);
- return;
- }
+ return;
+
+ if (!GetFileVersionInfo (FileName, dwHandle, dwLen, lpData))
+ {
+ HeapFree(GetProcessHeap(), 0, lpData);
+ return;
+ }
if (VerQueryValue(lpData,
_T("\\VarFileInfo\\Translation"), &pvData, (PUINT) &BufLen))
{
@@ -230,12 +231,13 @@
wsprintf(szStrFileInfo,
_T("StringFileInfo\\%04X%04X\\CompanyName"), wCodePage, wLangID);
}
- if (VerQueryValue (lpData, szStrFileInfo, (LPVOID) &lpBuffer,
(PUINT) &BufLen)) {
+ if (VerQueryValue (lpData, szStrFileInfo, (LPVOID) &lpBuffer,
(PUINT) &BufLen))
+ {
item.pszText = lpBuffer;
item.iSubItem = 2;
SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem,
(LPARAM) &item);
}
- HeapFree(GetProcessHeap(), 0, lpData);
+ HeapFree(GetProcessHeap(), 0, lpData);
}
else
{
@@ -259,5 +261,4 @@
CloseServiceHandle(ScHandle);
}
-
}
Modified: trunk/reactos/base/applications/msconfig/startuppage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/startuppage.c (original)
+++ trunk/reactos/base/applications/msconfig/startuppage.c Tue Aug 29 17:01:47 2006
@@ -60,8 +60,8 @@
GetAutostartEntriesFromRegistry(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"));
GetAutostartEntriesFromRegistry(HKEY_CURRENT_USER,
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"));
- GetDisabledAutostartEntriesFromRegistry (_T("SOFTWARE\\Microsoft\\Shared
Tools\\MSConfig\\startupreg"));
- GetDisabledAutostartEntriesFromRegistry (_T("SOFTWARE\\Microsoft\\Shared
Tools\\MSConfig\\startupfolder"));
+ GetDisabledAutostartEntriesFromRegistry (_T("SOFTWARE\\Microsoft\\Shared
Tools\\MSConfig\\startupreg"));
+ GetDisabledAutostartEntriesFromRegistry (_T("SOFTWARE\\Microsoft\\Shared
Tools\\MSConfig\\startupfolder"));
//FIXME: What about HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon\Userinit
//FIXME: Common Startup (startmenu)
@@ -181,7 +181,7 @@
item.iItem = ListView_GetItemCount(hStartupListCtrl);
item.lParam = 0;
(void)ListView_InsertItem(hStartupListCtrl, &item);
- ListView_SetCheckState(hStartupListCtrl, item.iItem, TRUE);
+ ListView_SetCheckState(hStartupListCtrl, item.iItem, TRUE);
if (dwType == REG_SZ)
{
Modified: trunk/reactos/base/applications/msconfig/systempage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/systempage.c (original)
+++ trunk/reactos/base/applications/msconfig/systempage.c Tue Aug 29 17:01:47 2006
@@ -17,11 +17,13 @@
UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam);
switch (message) {
- case WM_INITDIALOG:
- hSystemDialog = hDlg;
- SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOSIZE | SWP_NOZORDER);
- return TRUE;
- }
+ case WM_INITDIALOG:
+ {
+ hSystemDialog = hDlg;
+ SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER |
SWP_NOSIZE | SWP_NOZORDER);
+ return TRUE;
+ }
+ }
- return 0;
+ return 0;
}
Modified: trunk/reactos/base/applications/msconfig/toolspage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig…
==============================================================================
--- trunk/reactos/base/applications/msconfig/toolspage.c (original)
+++ trunk/reactos/base/applications/msconfig/toolspage.c Tue Aug 29 17:01:47 2006
@@ -20,11 +20,11 @@
DWORD ListItems_Params[20];
void AddItem ( DWORD name_id, DWORD descr_id, DWORD cmd_id , DWORD param_id ) {
- TCHAR szTemp[256];
+ TCHAR szTemp[256];
LV_ITEM item;
- LoadString(hInst, name_id, szTemp, 256);
- memset(&item, 0, sizeof(LV_ITEM));
+ LoadString(hInst, name_id, szTemp, 256);
+ memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_TEXT;
item.iImage = 0;
item.pszText = szTemp;
@@ -32,102 +32,114 @@
item.lParam = 0;
(void)ListView_InsertItem(hToolsListCtrl, &item);
- ListItems_Cmds[item.iItem] = cmd_id;
- ListItems_Params[item.iItem] = param_id;
+ 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);
+ 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);
+ 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;
- DWORD dwStyle;
+ LV_COLUMN column;
+ TCHAR szTemp[256];
+ TCHAR szTemp2[256];
+ LPNMITEMACTIVATE lpnmitem;
+ LPNMHDR nmh;
+ DWORD dwStyle;
- switch (message) {
- case WM_INITDIALOG:
+ switch (message)
+ {
+ case WM_INITDIALOG:
+ {
+ hToolsListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST);
+ hToolsDialog = hDlg;
- hToolsListCtrl = GetDlgItem(hDlg, IDC_TOOLS_LIST);
- hToolsDialog = hDlg;
+ dwStyle = (DWORD) SendMessage(hToolsListCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE,
0, 0);
+ dwStyle = dwStyle | LVS_EX_FULLROWSELECT;
+ SendMessage(hToolsListCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle);
- dwStyle = (DWORD) 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);
- 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;
- // 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;
+ (void)ListView_InsertColumn(hToolsListCtrl, 0, &column);
- LoadString(hInst, IDS_TOOLS_COLUMN_NAME, szTemp, 256);
- column.pszText = szTemp;
- column.cx = 150;
- (void)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;
+ (void)ListView_InsertColumn(hToolsListCtrl, 1, &column);
- column.mask = LVCF_TEXT | LVCF_WIDTH;
- LoadString(hInst, IDS_TOOLS_COLUMN_DESCR, szTemp, 256);
- column.pszText = szTemp;
- column.cx = 500;
- (void)ListView_InsertColumn(hToolsListCtrl, 1, &column);
-
- FillListView();
- return TRUE;
-
+ 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;
+ 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;
}