Remove two hardcode string to En.rc it is IDS_Not_Responding, IDS_Running

thx irc: potapnik for notice one of them 


svn path=/trunk/; revision=15144
This commit is contained in:
Magnus Olsen 2005-05-08 18:20:39 +00:00
parent df8fe14cb4
commit 65305e4968
4 changed files with 18 additions and 3 deletions

View file

@ -664,6 +664,8 @@ BEGIN
IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK"
IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%"
IDS_STATUS_PROCESSES "Processes: %d" IDS_STATUS_PROCESSES "Processes: %d"
IDS_Not_Responding "Not Responding"
IDS_Running "Running"
END END

View file

@ -489,6 +489,7 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
LPNM_LISTVIEW pnmv; LPNM_LISTVIEW pnmv;
LV_DISPINFO* pnmdi; LV_DISPINFO* pnmdi;
LPAPPLICATION_PAGE_LIST_ITEM pAPLI; LPAPPLICATION_PAGE_LIST_ITEM pAPLI;
TCHAR szMsg[256];
idctrl = (int) wParam; idctrl = (int) wParam;
@ -515,9 +516,15 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
else if (pnmdi->item.iSubItem == 1) else if (pnmdi->item.iSubItem == 1)
{ {
if (pAPLI->bHung) if (pAPLI->bHung)
_tcsncpy(pnmdi->item.pszText, _T("Not Responding"), pnmdi->item.cchTextMax); {
LoadString( GetModuleHandle(NULL), IDS_Not_Responding , (LPTSTR) szMsg,sizeof(szMsg));
_tcsncpy(pnmdi->item.pszText, szMsg, pnmdi->item.cchTextMax);
}
else else
_tcsncpy(pnmdi->item.pszText, _T("Running"), pnmdi->item.cchTextMax); {
LoadString( GetModuleHandle(NULL), IDS_Running, (LPTSTR) szMsg,sizeof(szMsg));
_tcsncpy(pnmdi->item.pszText, szMsg, pnmdi->item.cchTextMax);
}
} }
break; break;

View file

@ -240,6 +240,8 @@
#define IDS_STATUS_MEMUSAGE 363 #define IDS_STATUS_MEMUSAGE 363
#define IDS_STATUS_CPUUSAGE 364 #define IDS_STATUS_CPUUSAGE 364
#define IDS_STATUS_PROCESSES 365 #define IDS_STATUS_PROCESSES 365
#define IDS_Not_Responding 366
#define IDS_Running 367
// Next default values for new objects // Next default values for new objects

View file

@ -135,6 +135,7 @@ BOOL TrayIcon_ShellAddTrayIcon(void)
NOTIFYICONDATA nid; NOTIFYICONDATA nid;
HICON hIcon = NULL; HICON hIcon = NULL;
BOOL bRetVal; BOOL bRetVal;
TCHAR szMsg[256];
memset(&nid, 0, sizeof(NOTIFYICONDATA)); memset(&nid, 0, sizeof(NOTIFYICONDATA));
@ -146,7 +147,10 @@ BOOL TrayIcon_ShellAddTrayIcon(void)
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage = WM_ONTRAYICON; nid.uCallbackMessage = WM_ONTRAYICON;
nid.hIcon = hIcon; nid.hIcon = hIcon;
wsprintf(nid.szTip, _T("CPU Usage: %d%%"), PerfDataGetProcessorUsage());
LoadString( GetModuleHandle(NULL), IDS_MSG_TRAYICONCPUUSAGE, (LPTSTR) szMsg,sizeof(szMsg));
wsprintf(nid.szTip, szMsg, PerfDataGetProcessorUsage());
bRetVal = Shell_NotifyIcon(NIM_ADD, &nid); bRetVal = Shell_NotifyIcon(NIM_ADD, &nid);