Remove all hardcode english phrases from the source code and add the
phrases to the resource file.
Modified: trunk/reactos/subsys/system/taskmgr/De.rc
Modified: trunk/reactos/subsys/system/taskmgr/En.rc
Modified: trunk/reactos/subsys/system/taskmgr/affinity.c
Modified: trunk/reactos/subsys/system/taskmgr/applpage.c
Modified: trunk/reactos/subsys/system/taskmgr/column.c
Modified: trunk/reactos/subsys/system/taskmgr/debug.c
Modified: trunk/reactos/subsys/system/taskmgr/endproc.c
Modified: trunk/reactos/subsys/system/taskmgr/priority.c
Modified: trunk/reactos/subsys/system/taskmgr/resource.h
Modified: trunk/reactos/subsys/system/taskmgr/run.c
Modified: trunk/reactos/subsys/system/taskmgr/taskmgr.c
Modified: trunk/reactos/subsys/system/taskmgr/trayicon.c
_____
Modified: trunk/reactos/subsys/system/taskmgr/De.rc
--- trunk/reactos/subsys/system/taskmgr/De.rc 2005-03-27 19:57:26 UTC
(rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/De.rc 2005-03-27 20:01:18 UTC
(rev 14355)
@@ -1,6 +1,6 @@
////////////////////////////////////////////////////////////////////////
/////
-// Deutsch (Austria)
-// resources by Klemens Friedl frik85 at hotmail dot com
http://www.reactos.net.tc
+// Deutsch
+// resource file by Klemens Friedl (frik85(a)reactos.at;
http://frik85.reactos.at)
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
@@ -649,5 +649,63 @@
IDS_LICENSE "Dieses Programm ist kostenlos; Sie k÷nnen
es frei verteilen mit od. ohne ?nderungen unter der GNU Lesser General
Public License wie es von der Free Software Foundation ver÷ffentlicht
wurde; entweder Version 2.1 der Lizenz, oder eine spõtere Version (ihrer
Wahl).\r\n\r\nThis 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.\r\n\r\nYou should have received
a copy of the GNU General Public License along with this program; if
not, write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA."
END
-#endif // Deutsch (Austria) resources by Klemens Friedl
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_TAB_APPS "Anwendnungen"
+ IDS_TAB_PROCESSES "Prozesse"
+ IDS_TAB_PERFORMANCE "Systemleistung"
+ IDS_TAB_TASK "Anwendung"
+ IDS_TAB_STATUS "Status"
+ IDS_TAB_IMAGENAME "Name"
+ IDS_TAB_PID "PID"
+ IDS_TAB_USERNAME "Benutzername"
+ IDS_TAB_SESSIONID "Sitzungserkennung"
+ IDS_TAB_CPU "CPU-Auslastung"
+ IDS_TAB_CPUTIME "CPU-Zeit"
+ IDS_TAB_MEMUSAGE "Speicherauslastung"
+ IDS_TAB_PEAKMEMUSAGE "Verõnd. der Speicherauslastung"
+ IDS_TAB_MEMDELTA "Maximale Speicherauslastung"
+ IDS_TAB_PAGEFAULT "Seitenfehler"
+ IDS_TAB_PFDELTA "Maximale Seitenfehler"
+ IDS_TAB_VMSIZE "Virtuelle Arbeitsspeichergr÷?e"
+ IDS_TAB_PAGEDPOOL "Paged Pool"
+ IDS_TAB_NPPOOL "NP Pool"
+ IDS_TAB_BASEPRI "Basispri"
+ IDS_TAB_HANDLES "Handleanzahl"
+ IDS_TAB_THREADS "Threadanzahl"
+ IDS_TAB_USERPBJECTS "Benutzer-Objekte"
+ IDS_TAB_GDIOBJECTS "GDI-Objekte"
+ IDS_TAB_IOREADS "E/A (Lesen)"
+ IDS_TAB_IOWRITES "E/A (Schreiben)"
+ IDS_TAB_IOOTHER "E/A (Andere)"
+ IDS_TAB_IOREADBYTES "E/A-Bytes (Lesen)"
+ IDS_TAB_IOWRITESBYTES "E/A-Bytes (Schreiben)"
+ IDS_TAB_IOOTHERBYTES "E/A-Bytes (Andere)"
+ IDS_MENU_SELECTCOLUMNS "&Spalten auswõhlen..."
+ IDS_MENU_16BITTASK "&16-Bit-Tasks anzeigen"
+ IDS_MENU_WINDOWS "&Fenster"
+ IDS_MENU_LARGEICONS "&Gro?e Symbole"
+ IDS_MENU_SMALLICONS "Kl&eine Symbole"
+ IDS_MENU_DETAILS "&Details"
+ IDS_MENU_ONEGRAPHALLCPUS "&Alle CPUs in einem Diagramm"
+ IDS_MENU_ONEGRAPHPERCPU "&Ein Diagramm pro CPU"
+ IDS_MENU_CPUHISTORY "&CPU Verlauf"
+ IDS_MENU_SHOWKERNELTIMES "&Kernel-Zeiten anzeigen"
+ IDS_CREATENEWTASK "Neuen Task erstellen"
+ IDS_CREATENEWTASK_DESC "Geben Sie Programme, Ordner,
Dokumente oder Internetressourcen an, die ge÷ffnet werden sollen."
+ IDS_MSG_ACCESSPROCESSAFF "Unable to Access or Set Process
Affinity"
+ IDS_MSG_PROCESSONEPRO "Der Prozess muss eine Zugeh÷rigkeit
zu mindestens einem Prozessor aufweisen."
+ IDS_MSG_INVALIDOPTION "Ung³ltige Auswahl"
+ IDS_MSG_UNABLEDEBUGPROCESS "Unable to Debug Process"
+ IDS_MSG_WARNINGDEBUG "WARNUNG: Das Debuggen dieses
Prozesses kann zu Datenverlust f³hren.\nSind Sie sicher, dass Sie diesen
Prozess debuggen m÷chten?"
+ IDS_MSG_TASKMGRWARNING "Warnung vom Task-Manager"
+ IDS_MSG_WARNINGTERMINATING "WARNUNG: Das Abbrechen eines
Prozesses kann zu\nunerw³nschten Ergebnissen, einschlie?lich
Datenverlust und\nSysteminstabilitõt, f³hren. Zustand und Daten des
Prozesses\nwerden nicht mher gespeichert. Sind Sie sicher, dass Sie\nden
Prozess abbrechen m÷chten?"
+ IDS_MSG_UNABLETERMINATEPRO "Unable to Terminate Process"
+ IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority"
+ IDS_MSG_WARNINGCHANGEPRIORITY "WARNUNG: Das ?ndern der
Prioritõtsklasse dieses Prozesses\nkann zu unerw³nschten Ergebnissen,
einschl. Systeminstabilitõt, f³hren.\nSind Sie sicher, dass Sie õndern
m÷chten?"
+ IDS_MSG_TRAYICONCPUUSAGE "CPU-Auslastung: %d%%"
+
+END
+
+#endif
////////////////////////////////////////////////////////////////////////
/////
_____
Modified: trunk/reactos/subsys/system/taskmgr/En.rc
--- trunk/reactos/subsys/system/taskmgr/En.rc 2005-03-27 19:57:26 UTC
(rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/En.rc 2005-03-27 20:01:18 UTC
(rev 14355)
@@ -604,6 +604,66 @@
IDS_LICENSE "This program is free software; you can
redistribute it and/or modify it under the terms of the GNU Lesser
General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later
version.\r\n\r\nThis 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.\r\n\r\nYou should have received
a copy of the GNU General Public License along with this program; if
not, write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA."
END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_TAB_APPS "Applications"
+ IDS_TAB_PROCESSES "Processes"
+ IDS_TAB_PERFORMANCE "Performance"
+ IDS_TAB_TASK "Task"
+ IDS_TAB_STATUS "Status"
+ IDS_TAB_IMAGENAME "Image Name"
+ IDS_TAB_PID "PID"
+ IDS_TAB_USERNAME "Username"
+ IDS_TAB_SESSIONID "Session ID"
+ IDS_TAB_CPU "CPU"
+ IDS_TAB_CPUTIME "CPU Time"
+ IDS_TAB_MEMUSAGE "Mem Usage"
+ IDS_TAB_PEAKMEMUSAGE "Peak Mem Usage"
+ IDS_TAB_MEMDELTA "Mem Delta"
+ IDS_TAB_PAGEFAULT "Page Faults"
+ IDS_TAB_PFDELTA "PF Delta"
+ IDS_TAB_VMSIZE "VM Size"
+ IDS_TAB_PAGEDPOOL "Paged Pool"
+ IDS_TAB_NPPOOL "NP Pool"
+ IDS_TAB_BASEPRI "Base Pri"
+ IDS_TAB_HANDLES "Handles"
+ IDS_TAB_THREADS "Threads"
+ IDS_TAB_USERPBJECTS "USER Objects"
+ IDS_TAB_GDIOBJECTS "GDI Objects"
+ IDS_TAB_IOREADS "I/O Reads"
+ IDS_TAB_IOWRITES "I/O Writes"
+ IDS_TAB_IOOTHER "I/O Other"
+ IDS_TAB_IOREADBYTES "I/O Read Bytes"
+ IDS_TAB_IOWRITESBYTES "I/O Write Bytes"
+ IDS_TAB_IOOTHERBYTES "I/O Other Bytes"
+ IDS_MENU_SELECTCOLUMNS "&Select Columns..."
+ IDS_MENU_16BITTASK "&Show 16-bit tasks"
+ IDS_MENU_WINDOWS "&Windows"
+ IDS_MENU_LARGEICONS "Lar&ge Icons"
+ IDS_MENU_SMALLICONS "S&mall Icons"
+ IDS_MENU_DETAILS "&Details"
+ IDS_MENU_ONEGRAPHALLCPUS "&One Graph, All CPUs"
+ IDS_MENU_ONEGRAPHPERCPU "One Graph &Per CPU"
+ IDS_MENU_CPUHISTORY "&CPU History"
+ IDS_MENU_SHOWKERNELTIMES "&Show Kernel Times"
+ IDS_CREATENEWTASK "Create New Task"
+ IDS_CREATENEWTASK_DESC "Type the name of a program, folder,
document, or Internet resource, and Task Manager will open it for you."
+ IDS_MSG_ACCESSPROCESSAFF "Unable to Access or Set Process
Affinity"
+ IDS_MSG_PROCESSONEPRO "The process must have affinity with
at least one processor."
+ IDS_MSG_INVALIDOPTION "Invalid Option"
+ IDS_MSG_UNABLEDEBUGPROCESS "Unable to Debug Process"
+ IDS_MSG_WARNINGDEBUG "WARNING: Debugging this process may
result in loss of data.\nAre you sure you wish to attach the debugger?"
+ IDS_MSG_TASKMGRWARNING "Task Manager Warning"
+ IDS_MSG_WARNINGTERMINATING "WARNING: Terminating a process can
cause undesired\nresults including loss of data and system instability.
The\nprocess will not be given the chance to save its state or\ndata
before it is terminated. Are you sure you want to\nterminate the
process?"
+ IDS_MSG_UNABLETERMINATEPRO "Unable to Terminate Process"
+ IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority"
+ IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class
of this process may\ncause undesired results including system
instability. Are you\nsure you want to change the priority class?"
+ IDS_MSG_TRAYICONCPUUSAGE "CPU Usage: %d%%"
+
+END
+
+
#endif // English (U.S.) resources
////////////////////////////////////////////////////////////////////////
/////
_____
Modified: trunk/reactos/subsys/system/taskmgr/affinity.c
--- trunk/reactos/subsys/system/taskmgr/affinity.c 2005-03-27
19:57:26 UTC (rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/affinity.c 2005-03-27
20:01:18 UTC (rev 14355)
@@ -4,6 +4,7 @@
* affinity.cpp
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
+ * 2005 Klemens Friedl <frik85(a)reactos.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -34,12 +35,14 @@
#include "perfdata.h"
HANDLE hProcessAffinityHandle;
+TCHAR szTemp[256];
+TCHAR szTempA[256];
INT_PTR CALLBACK AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM
wParam, LPARAM lParam);
void ProcessPage_OnSetAffinity(void)
{
- LV_ITEM lvitem;
+ LV_ITEM lvitem;
ULONG Index;
DWORD dwProcessId;
TCHAR strErrorText[260];
@@ -59,7 +62,8 @@
hProcessAffinityHandle =
OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, FALSE,
dwProcessId);
if (!hProcessAffinityHandle) {
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Access or Set
Process Affinity"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
DialogBox(hInst, MAKEINTRESOURCE(IDD_AFFINITY_DIALOG), hMainWnd,
AffinityDialogWndProc);
@@ -86,7 +90,8 @@
if (!GetProcessAffinityMask(hProcessAffinityHandle,
&dwProcessAffinityMask, &dwSystemAffinityMask)) {
GetLastErrorText(strErrorText, 260);
EndDialog(hDlg, 0);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Access or
Set Process Affinity"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp,
MB_OK|MB_ICONSTOP);
}
/*
@@ -321,7 +326,9 @@
* of it's cpu time.
*/
if (!dwProcessAffinityMask) {
- MessageBox(hDlg, _T("The process must have affinity
with at least one processor."), _T("Invalid Option"),
MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_PROCESSONEPRO, szTemp, 256);
+ LoadString(hInst, IDS_MSG_INVALIDOPTION, szTempA, 256);
+ MessageBox(hDlg, szTemp, szTempA, MB_OK|MB_ICONSTOP);
return TRUE;
}
@@ -331,7 +338,8 @@
if (!SetProcessAffinityMask(hProcessAffinityHandle,
dwProcessAffinityMask)) {
GetLastErrorText(strErrorText, 260);
EndDialog(hDlg, LOWORD(wParam));
- MessageBox(hMainWnd, strErrorText, _T("Unable to Access
or Set Process Affinity"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp,
256);
+ MessageBox(hMainWnd, strErrorText, szTemp,
MB_OK|MB_ICONSTOP);
}
EndDialog(hDlg, LOWORD(wParam));
_____
Modified: trunk/reactos/subsys/system/taskmgr/applpage.c
--- trunk/reactos/subsys/system/taskmgr/applpage.c 2005-03-27
19:57:26 UTC (rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/applpage.c 2005-03-27
20:01:18 UTC (rev 14355)
@@ -4,6 +4,7 @@
* applicationpage.cpp
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
+ * 2005 Klemens Friedl <frik85(a)reactos.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -95,12 +96,13 @@
/* Initialize the application page's controls */
column.mask = LVCF_TEXT|LVCF_WIDTH;
- _tcscpy(szTemp, _T("Task"));
+
+ LoadString(hInst, IDS_TAB_TASK, szTemp, 256);
column.pszText = szTemp;
column.cx = 250;
ListView_InsertColumn(hApplicationPageListCtrl, 0, &column);
/* Add the "Task" column */
column.mask = LVCF_TEXT|LVCF_WIDTH;
- _tcscpy(szTemp, _T("Status"));
+ LoadString(hInst, IDS_TAB_STATUS, szTemp, 256);
column.pszText = szTemp;
column.cx = 95;
ListView_InsertColumn(hApplicationPageListCtrl, 1, &column);
/* Add the "Status" column */
_____
Modified: trunk/reactos/subsys/system/taskmgr/column.c
--- trunk/reactos/subsys/system/taskmgr/column.c 2005-03-27
19:57:26 UTC (rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/column.c 2005-03-27
20:01:18 UTC (rev 14355)
@@ -4,6 +4,7 @@
* column.cpp
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
+ * 2005 Klemens Friedl <frik85(a)reactos.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -32,6 +33,7 @@
#include "procpage.h"
UINT ColumnDataHints[25];
+TCHAR szTemp[256];
int InsertColumn(int nCol, LPCTSTR lpszColumnHeading,
int nFormat, int nWidth, int nSubItem);
INT_PTR CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message,
WPARAM wParam, LPARAM lParam);
@@ -40,57 +42,127 @@
{
int size;
- if (TaskManagerSettings.Column_ImageName)
- InsertColumn(0, _T("Image Name"), LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[0], -1);
- if (TaskManagerSettings.Column_PID)
- InsertColumn(1, _T("PID"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[1], -1);
- if (TaskManagerSettings.Column_UserName)
- InsertColumn(2, _T("Username"), LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[2], -1);
- if (TaskManagerSettings.Column_SessionID)
- InsertColumn(3, _T("Session ID"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[3], -1);
- if (TaskManagerSettings.Column_CPUUsage)
- InsertColumn(4, _T("CPU"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[4], -1);
- if (TaskManagerSettings.Column_CPUTime)
- InsertColumn(5, _T("CPU Time"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[5], -1);
- if (TaskManagerSettings.Column_MemoryUsage)
- InsertColumn(6, _T("Mem Usage"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[6], -1);
- if (TaskManagerSettings.Column_PeakMemoryUsage)
- InsertColumn(7, _T("Peak Mem Usage"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[7], -1);
- if (TaskManagerSettings.Column_MemoryUsageDelta)
- InsertColumn(8, _T("Mem Delta"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[8], -1);
- if (TaskManagerSettings.Column_PageFaults)
- InsertColumn(9, _T("Page Faults"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[9], -1);
- if (TaskManagerSettings.Column_PageFaultsDelta)
- InsertColumn(10, _T("PF Delta"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[10], -1);
- if (TaskManagerSettings.Column_VirtualMemorySize)
- InsertColumn(11, _T("VM Size"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[11], -1);
- if (TaskManagerSettings.Column_PagedPool)
- InsertColumn(12, _T("Paged Pool"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[12], -1);
- if (TaskManagerSettings.Column_NonPagedPool)
- InsertColumn(13, _T("NP Pool"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[13], -1);
- if (TaskManagerSettings.Column_BasePriority)
- InsertColumn(14, _T("Base Pri"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[14], -1);
- if (TaskManagerSettings.Column_HandleCount)
- InsertColumn(15, _T("Handles"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[15], -1);
- if (TaskManagerSettings.Column_ThreadCount)
- InsertColumn(16, _T("Threads"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[16], -1);
- if (TaskManagerSettings.Column_USERObjects)
- InsertColumn(17, _T("USER Objects"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[17], -1);
- if (TaskManagerSettings.Column_GDIObjects)
- InsertColumn(18, _T("GDI Objects"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[18], -1);
- if (TaskManagerSettings.Column_IOReads)
- InsertColumn(19, _T("I/O Reads"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[19], -1);
- if (TaskManagerSettings.Column_IOWrites)
- InsertColumn(20, _T("I/O Writes"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[20], -1);
- if (TaskManagerSettings.Column_IOOther)
- InsertColumn(21, _T("I/O Other"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[21], -1);
- if (TaskManagerSettings.Column_IOReadBytes)
- InsertColumn(22, _T("I/O Read Bytes"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[22], -1);
- if (TaskManagerSettings.Column_IOWriteBytes)
- InsertColumn(23, _T("I/O Write Bytes"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[23], -1);
- if (TaskManagerSettings.Column_IOOtherBytes)
- InsertColumn(24, _T("I/O Other Bytes"), LVCFMT_RIGHT,
TaskManagerSettings.ColumnSizeArray[24], -1);
+ if (TaskManagerSettings.Column_ImageName) {
+ LoadString(hInst, IDS_TAB_IMAGENAME, szTemp, 256);
+ InsertColumn(0, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[0], -1);
+ }
+ if (TaskManagerSettings.Column_PID) {
+ LoadString(hInst, IDS_TAB_PID, szTemp, 256);
+ InsertColumn(1, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[1], -1);
+ }
+ if (TaskManagerSettings.Column_UserName) {
+ LoadString(hInst, IDS_TAB_USERNAME, szTemp, 256);
+ InsertColumn(2, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[2], -1);
+ }
+ if (TaskManagerSettings.Column_SessionID) {
+ LoadString(hInst, IDS_TAB_SESSIONID, szTemp, 256);
+ InsertColumn(3, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[3], -1);
+ }
+ if (TaskManagerSettings.Column_CPUUsage) {
+ LoadString(hInst, IDS_TAB_CPU, szTemp, 256);
+ InsertColumn(4, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[4], -1);
+ }
+ if (TaskManagerSettings.Column_CPUTime) {
+ LoadString(hInst, IDS_TAB_CPUTIME, szTemp, 256);
+ InsertColumn(5, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[5], -1);
+ }
+
+ if (TaskManagerSettings.Column_MemoryUsage) {
+ LoadString(hInst, IDS_TAB_MEMUSAGE, szTemp, 256);
+ InsertColumn(6, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[6], -1);
+ }
+
+ if (TaskManagerSettings.Column_PeakMemoryUsage) {
+ LoadString(hInst, IDS_TAB_PEAKMEMUSAGE, szTemp, 256);
+ InsertColumn(7, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[7], -1);
+ }
+
+ if (TaskManagerSettings.Column_MemoryUsageDelta) {
+ LoadString(hInst, IDS_TAB_MEMDELTA, szTemp, 256);
+ InsertColumn(8, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[8], -1);
+ }
+
+ if (TaskManagerSettings.Column_PageFaults) {
+ LoadString(hInst, IDS_TAB_PAGEFAULT, szTemp, 256);
+ InsertColumn(9, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[9], -1);
+ }
+
+ if (TaskManagerSettings.Column_PageFaultsDelta) {
+ LoadString(hInst, IDS_TAB_PFDELTA, szTemp, 256);
+ InsertColumn(10, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[10], -1);
+ }
+
+ if (TaskManagerSettings.Column_VirtualMemorySize) {
+ LoadString(hInst, IDS_TAB_VMSIZE, szTemp, 256);
+ InsertColumn(11, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[11], -1);
+ }
+
+ if (TaskManagerSettings.Column_PagedPool) {
+ LoadString(hInst, IDS_TAB_PAGEDPOOL, szTemp, 256);
+ InsertColumn(12, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[12], -1);
+ }
+
+ if (TaskManagerSettings.Column_NonPagedPool) {
+ LoadString(hInst, IDS_TAB_NPPOOL, szTemp, 256);
+ InsertColumn(13, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[13], -1);
+ }
+
+ if (TaskManagerSettings.Column_BasePriority) {
+ LoadString(hInst, IDS_TAB_BASEPRI, szTemp, 256);
+ InsertColumn(14, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[14], -1);
+ }
+
+ if (TaskManagerSettings.Column_HandleCount) {
+ LoadString(hInst, IDS_TAB_HANDLES, szTemp, 256);
+ InsertColumn(15, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[15], -1);
+ }
+
+ if (TaskManagerSettings.Column_ThreadCount) {
+ LoadString(hInst, IDS_TAB_THREADS, szTemp, 256);
+ InsertColumn(16, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[16], -1);
+ }
+
+ if (TaskManagerSettings.Column_USERObjects) {
+ LoadString(hInst, IDS_TAB_USERPBJECTS, szTemp, 256);
+ InsertColumn(17, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[17], -1);
+ }
+
+ if (TaskManagerSettings.Column_GDIObjects) {
+ LoadString(hInst, IDS_TAB_GDIOBJECTS, szTemp, 256);
+ InsertColumn(18, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[18], -1);
+ }
+
+ if (TaskManagerSettings.Column_IOReads) {
+ LoadString(hInst, IDS_TAB_IOREADS, szTemp, 256);
+ InsertColumn(19, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[19], -1);
+ }
+
+ if (TaskManagerSettings.Column_IOWrites) {
+ LoadString(hInst, IDS_TAB_IOWRITES, szTemp, 256);
+ InsertColumn(20, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[20], -1);
+ }
+
+ if (TaskManagerSettings.Column_IOOther) {
+ LoadString(hInst, IDS_TAB_IOOTHER, szTemp, 256);
+ InsertColumn(21, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[21], -1);
+ }
+
+ if (TaskManagerSettings.Column_IOReadBytes) {
+ LoadString(hInst, IDS_TAB_IOREADBYTES, szTemp, 256);
+ InsertColumn(22, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[22], -1);
+ }
+
+ if (TaskManagerSettings.Column_IOWriteBytes) {
+ LoadString(hInst, IDS_TAB_IOWRITESBYTES, szTemp, 256);
+ InsertColumn(23, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[23], -1);
+ }
+
+ if (TaskManagerSettings.Column_IOOtherBytes) {
+ LoadString(hInst, IDS_TAB_IOOTHERBYTES, szTemp, 256);
+ InsertColumn(24, szTemp, LVCFMT_LEFT,
TaskManagerSettings.ColumnSizeArray[24], -1);
+ }
+
size = SendMessage(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
SendMessage(hProcessPageHeaderCtrl, HDM_SETORDERARRAY, (WPARAM)
size, (LPARAM) &TaskManagerSettings.ColumnOrderArray);
@@ -196,127 +268,176 @@
SendMessage(hProcessPageHeaderCtrl, HDM_GETITEM, i, (LPARAM)
&hditem);
- if (_tcsicmp(text, _T("Image Name")) == 0)
+ LoadString(hInst, IDS_TAB_IMAGENAME, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_ImageName = TRUE;
TaskManagerSettings.ColumnSizeArray[0] = hditem.cxy;
}
- if (_tcsicmp(text, _T("PID")) == 0)
+
+ LoadString(hInst, IDS_TAB_PID, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_PID = TRUE;
TaskManagerSettings.ColumnSizeArray[1] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Username")) == 0)
+
+ LoadString(hInst, IDS_TAB_USERNAME, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_UserName = TRUE;
TaskManagerSettings.ColumnSizeArray[2] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Session ID")) == 0)
+
+ LoadString(hInst, IDS_TAB_SESSIONID, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_SessionID = TRUE;
TaskManagerSettings.ColumnSizeArray[3] = hditem.cxy;
}
- if (_tcsicmp(text, _T("CPU")) == 0)
+
+ LoadString(hInst, IDS_TAB_CPU, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_CPUUsage = TRUE;
TaskManagerSettings.ColumnSizeArray[4] = hditem.cxy;
}
- if (_tcsicmp(text, _T("CPU Time")) == 0)
+
+ LoadString(hInst, IDS_TAB_CPUTIME, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_CPUTime = TRUE;
TaskManagerSettings.ColumnSizeArray[5] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Mem Usage")) == 0)
+
+ LoadString(hInst, IDS_TAB_MEMUSAGE, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_MemoryUsage = TRUE;
TaskManagerSettings.ColumnSizeArray[6] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Peak Mem Usage")) == 0)
+
+ LoadString(hInst, IDS_TAB_PEAKMEMUSAGE, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_PeakMemoryUsage = TRUE;
TaskManagerSettings.ColumnSizeArray[7] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Mem Delta")) == 0)
+
+ LoadString(hInst, IDS_TAB_MEMDELTA, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_MemoryUsageDelta = TRUE;
TaskManagerSettings.ColumnSizeArray[8] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Page Faults")) == 0)
+
+ LoadString(hInst, IDS_TAB_PAGEFAULT, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_PageFaults = TRUE;
TaskManagerSettings.ColumnSizeArray[9] = hditem.cxy;
}
- if (_tcsicmp(text, _T("PF Delta")) == 0)
+
+ LoadString(hInst, IDS_TAB_PFDELTA, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_PageFaultsDelta = TRUE;
TaskManagerSettings.ColumnSizeArray[10] = hditem.cxy;
}
- if (_tcsicmp(text, _T("VM Size")) == 0)
+
+ LoadString(hInst, IDS_TAB_VMSIZE, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_VirtualMemorySize = TRUE;
TaskManagerSettings.ColumnSizeArray[11] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Paged Pool")) == 0)
+
+ LoadString(hInst, IDS_TAB_PAGEDPOOL, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_PagedPool = TRUE;
TaskManagerSettings.ColumnSizeArray[12] = hditem.cxy;
}
- if (_tcsicmp(text, _T("NP Pool")) == 0)
+
+ LoadString(hInst, IDS_TAB_NPPOOL, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_NonPagedPool = TRUE;
TaskManagerSettings.ColumnSizeArray[13] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Base Pri")) == 0)
+
+ LoadString(hInst, IDS_TAB_BASEPRI, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_BasePriority = TRUE;
TaskManagerSettings.ColumnSizeArray[14] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Handles")) == 0)
+
+ LoadString(hInst, IDS_TAB_HANDLES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_HandleCount = TRUE;
TaskManagerSettings.ColumnSizeArray[15] = hditem.cxy;
}
- if (_tcsicmp(text, _T("Threads")) == 0)
+
+ LoadString(hInst, IDS_TAB_THREADS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_ThreadCount = TRUE;
TaskManagerSettings.ColumnSizeArray[16] = hditem.cxy;
}
- if (_tcsicmp(text, _T("USER Objects")) == 0)
+
+ LoadString(hInst, IDS_TAB_USERPBJECTS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_USERObjects = TRUE;
TaskManagerSettings.ColumnSizeArray[17] = hditem.cxy;
}
- if (_tcsicmp(text, _T("GDI Objects")) == 0)
+
+ LoadString(hInst, IDS_TAB_GDIOBJECTS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_GDIObjects = TRUE;
TaskManagerSettings.ColumnSizeArray[18] = hditem.cxy;
}
- if (_tcsicmp(text, _T("I/O Reads")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOREADS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_IOReads = TRUE;
TaskManagerSettings.ColumnSizeArray[19] = hditem.cxy;
}
- if (_tcsicmp(text, _T("I/O Writes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOWRITES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_IOWrites = TRUE;
TaskManagerSettings.ColumnSizeArray[20] = hditem.cxy;
}
- if (_tcsicmp(text, _T("I/O Other")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOOTHER, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_IOOther = TRUE;
TaskManagerSettings.ColumnSizeArray[21] = hditem.cxy;
}
- if (_tcsicmp(text, _T("I/O Read Bytes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOREADBYTES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_IOReadBytes = TRUE;
TaskManagerSettings.ColumnSizeArray[22] = hditem.cxy;
}
- if (_tcsicmp(text, _T("I/O Write Bytes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOWRITESBYTES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_IOWriteBytes = TRUE;
TaskManagerSettings.ColumnSizeArray[23] = hditem.cxy;
}
- if (_tcsicmp(text, _T("I/O Other Bytes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOOTHERBYTES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Column_IOOtherBytes = TRUE;
TaskManagerSettings.ColumnSizeArray[24] = hditem.cxy;
@@ -491,55 +612,104 @@
SendMessage(hProcessPageHeaderCtrl, HDM_GETITEM, Index,
(LPARAM) &hditem);
- if (_tcsicmp(text, _T("Image Name")) == 0)
+ LoadString(hInst, IDS_TAB_IMAGENAME, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IMAGENAME;
- if (_tcsicmp(text, _T("PID")) == 0)
+
+ LoadString(hInst, IDS_TAB_PID, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_PID;
- if (_tcsicmp(text, _T("Username")) == 0)
+
+ LoadString(hInst, IDS_TAB_USERNAME, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_USERNAME;
- if (_tcsicmp(text, _T("Session ID")) == 0)
+
+ LoadString(hInst, IDS_TAB_SESSIONID, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_SESSIONID;
- if (_tcsicmp(text, _T("CPU")) == 0)
+
+ LoadString(hInst, IDS_TAB_CPU, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_CPUUSAGE;
- if (_tcsicmp(text, _T("CPU Time")) == 0)
+
+ LoadString(hInst, IDS_TAB_CPUTIME, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_CPUTIME;
- if (_tcsicmp(text, _T("Mem Usage")) == 0)
+
+ LoadString(hInst, IDS_TAB_MEMUSAGE, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_MEMORYUSAGE;
- if (_tcsicmp(text, _T("Peak Mem Usage")) == 0)
+
+ LoadString(hInst, IDS_TAB_PEAKMEMUSAGE, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_PEAKMEMORYUSAGE;
- if (_tcsicmp(text, _T("Mem Delta")) == 0)
+
+ LoadString(hInst, IDS_TAB_MEMDELTA, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_MEMORYUSAGEDELTA;
- if (_tcsicmp(text, _T("Page Faults")) == 0)
+
+ LoadString(hInst, IDS_TAB_PAGEFAULT, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_PAGEFAULTS;
- if (_tcsicmp(text, _T("PF Delta")) == 0)
+
+ LoadString(hInst, IDS_TAB_PFDELTA, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_PAGEFAULTSDELTA;
- if (_tcsicmp(text, _T("VM Size")) == 0)
+
+ LoadString(hInst, IDS_TAB_VMSIZE, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_VIRTUALMEMORYSIZE;
- if (_tcsicmp(text, _T("Paged Pool")) == 0)
+
+ LoadString(hInst, IDS_TAB_PAGEDPOOL, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_PAGEDPOOL;
- if (_tcsicmp(text, _T("NP Pool")) == 0)
+
+ LoadString(hInst, IDS_TAB_NPPOOL, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_NONPAGEDPOOL;
- if (_tcsicmp(text, _T("Base Pri")) == 0)
+
+ LoadString(hInst, IDS_TAB_BASEPRI, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_BASEPRIORITY;
- if (_tcsicmp(text, _T("Handles")) == 0)
+
+ LoadString(hInst, IDS_TAB_HANDLES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_HANDLECOUNT;
- if (_tcsicmp(text, _T("Threads")) == 0)
+
+ LoadString(hInst, IDS_TAB_THREADS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_THREADCOUNT;
- if (_tcsicmp(text, _T("USER Objects")) == 0)
+
+ LoadString(hInst, IDS_TAB_USERPBJECTS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_USEROBJECTS;
- if (_tcsicmp(text, _T("GDI Objects")) == 0)
+
+ LoadString(hInst, IDS_TAB_GDIOBJECTS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_GDIOBJECTS;
- if (_tcsicmp(text, _T("I/O Reads")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOREADS, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IOREADS;
- if (_tcsicmp(text, _T("I/O Writes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOWRITES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IOWRITES;
- if (_tcsicmp(text, _T("I/O Other")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOOTHER, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IOOTHER;
- if (_tcsicmp(text, _T("I/O Read Bytes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOREADBYTES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IOREADBYTES;
- if (_tcsicmp(text, _T("I/O Write Bytes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOWRITESBYTES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IOWRITEBYTES;
- if (_tcsicmp(text, _T("I/O Other Bytes")) == 0)
+
+ LoadString(hInst, IDS_TAB_IOOTHERBYTES, szTemp, 256);
+ if (_tcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = COLUMN_IOOTHERBYTES;
}
}
_____
Modified: trunk/reactos/subsys/system/taskmgr/debug.c
--- trunk/reactos/subsys/system/taskmgr/debug.c 2005-03-27 19:57:26 UTC
(rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/debug.c 2005-03-27 20:01:18 UTC
(rev 14355)
@@ -4,6 +4,7 @@
* debug.cpp
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
+ * 2005 Klemens Friedl <frik85(a)reactos.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -35,18 +36,21 @@
void ProcessPage_OnDebug(void)
{
- LVITEM lvitem;
+ LVITEM lvitem;
ULONG Index;
DWORD dwProcessId;
TCHAR strErrorText[260];
- HKEY hKey;
+ HKEY hKey;
TCHAR strDebugPath[260];
TCHAR strDebugger[260];
DWORD dwDebuggerSize;
- PROCESS_INFORMATION pi;
- STARTUPINFO si;
- HANDLE hDebugEvent;
+ PROCESS_INFORMATION pi;
+ STARTUPINFO si;
+ HANDLE hDebugEvent;
+ TCHAR szTemp[256];
+ TCHAR szTempA[256];
+
for (Index=0;
Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
{
memset(&lvitem, 0, sizeof(LVITEM));
@@ -66,17 +70,22 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) ||
(dwProcessId == 0))
return;
- if (MessageBox(hMainWnd, _T("WARNING: Debugging this process may
result in loss of data.\nAre you sure you wish to attach the
debugger?"), _T("Task Manager Warning"), MB_YESNO|MB_ICONWARNING) !=
IDYES)
+ LoadString(hInst, IDS_MSG_WARNINGDEBUG, szTemp, 256);
+ LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+
+ if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING)
!= IDYES)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Debug
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_T("Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"), 0,
KEY_READ, &hKey) != ERROR_SUCCESS)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Debug
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
@@ -84,7 +93,8 @@
if (RegQueryValueEx(hKey, _T("Debugger"), NULL, NULL,
(LPBYTE)strDebugger, &dwDebuggerSize) != ERROR_SUCCESS)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Debug
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
RegCloseKey(hKey);
return;
}
@@ -95,7 +105,8 @@
if (!hDebugEvent)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Debug
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
@@ -107,7 +118,8 @@
if (!CreateProcess(NULL, strDebugPath, NULL, NULL, FALSE, 0, NULL,
NULL, &si, &pi))
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Debug
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hDebugEvent);
_____
Modified: trunk/reactos/subsys/system/taskmgr/endproc.c
--- trunk/reactos/subsys/system/taskmgr/endproc.c 2005-03-27
19:57:26 UTC (rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/endproc.c 2005-03-27
20:01:18 UTC (rev 14355)
@@ -4,6 +4,7 @@
* endproc.cpp
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
+ * 2005 Klemens Friedl <frik85(a)reactos.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -33,6 +34,9 @@
#include "procpage.h"
#include "perfdata.h"
+TCHAR szTemp[256];
+TCHAR szTempA[256];
+
void ProcessPage_OnEndProcess(void)
{
LVITEM lvitem;
@@ -60,7 +64,9 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) ||
(dwProcessId == 0))
return;
- if (MessageBox(hMainWnd, _T("WARNING: Terminating a process can
cause undesired\nresults including loss of data and system instability.
The\nprocess will not be given the chance to save its state or\ndata
before it is terminated. Are you sure you want to\nterminate the
process?"), _T("Task Manager Warning"), MB_YESNO|MB_ICONWARNING) !=
IDYES)
+ LoadString(hInst, IDS_MSG_WARNINGTERMINATING, szTemp, 256);
+ LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING)
!= IDYES)
return;
hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, dwProcessId);
@@ -68,14 +74,16 @@
if (!hProcess)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Terminate
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!TerminateProcess(hProcess, 0))
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Terminate
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -108,7 +116,9 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) ||
(dwProcessId == 0))
return;
- if (MessageBox(hMainWnd, _T("WARNING: Terminating a process can
cause undesired\nresults including loss of data and system instability.
The\nprocess will not be given the chance to save its state or\ndata
before it is terminated. Are you sure you want to\nterminate the
process?"), _T("Task Manager Warning"), MB_YESNO|MB_ICONWARNING) !=
IDYES)
+ LoadString(hInst, IDS_MSG_WARNINGTERMINATING, szTemp, 256);
+ LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING)
!= IDYES)
return;
hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, dwProcessId);
@@ -116,14 +126,16 @@
if (!hProcess)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Terminate
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!TerminateProcess(hProcess, 0))
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Terminate
Process"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
_____
Modified: trunk/reactos/subsys/system/taskmgr/priority.c
--- trunk/reactos/subsys/system/taskmgr/priority.c 2005-03-27
19:57:26 UTC (rev 14354)
+++ trunk/reactos/subsys/system/taskmgr/priority.c 2005-03-27
20:01:18 UTC (rev 14355)
@@ -4,6 +4,7 @@
* priority.c
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
+ * 2005 Klemens Friedl <frik85(a)reactos.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -33,6 +34,9 @@
#include "procpage.h"
#include "perfdata.h"
+TCHAR szTemp[256];
+TCHAR szTempA[256];
+
void ProcessPage_OnSetPriorityRealTime(void)
{
LVITEM lvitem;
@@ -60,7 +64,9 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) ||
(dwProcessId == 0))
return;
- if (MessageBox(hMainWnd, _T("WARNING: Changing the priority class
of this process may\ncause undesired results including system
instability. Are you\nsure you want to change the priority class?"),
_T("Task Manager Warning"), MB_YESNO|MB_ICONWARNING) != IDYES)
+ LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING)
!= IDYES)
return;
hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE,
dwProcessId);
@@ -68,14 +74,16 @@
if (!hProcess)
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Change
Priority"), MB_OK|MB_ICONSTOP);
+ LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- MessageBox(hMainWnd, strErrorText, _T("Unable to Change
Priority"), MB_OK|MB_ICONSTOP);
[truncated at 1000 lines; 404 more skipped]