6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
38 #include "ProcessPage.h"
44 HWND hProcessPage
; // Process List Property Page
46 HWND hProcessPageListCtrl
; // Process ListCtrl Window
47 HWND hProcessPageHeaderCtrl
; // Process Header Control
48 HWND hProcessPageEndProcessButton
; // Process End Process button
49 HWND hProcessPageShowAllProcessesButton
;// Process Show All Processes checkbox
51 static int nProcessPageWidth
;
52 static int nProcessPageHeight
;
54 static HANDLE hProcessPageEvent
= NULL
; // When this event becomes signaled then we refresh the process list
56 void ProcessPageOnNotify(WPARAM wParam
, LPARAM lParam
);
57 void CommaSeparateNumberString(LPTSTR strNumber
, int nMaxCount
);
58 void ProcessPageShowContextMenu(DWORD dwProcessId
);
59 void ProcessPageRefreshThread(void *lpParameter
);
61 LRESULT CALLBACK
ProcessPageWndProc(HWND hDlg
, UINT message
, WPARAM wParam
, LPARAM lParam
)
72 // Save the width and height
74 GetClientRect(hDlg
, &rc
);
75 nProcessPageWidth
= rc
.right
;
76 nProcessPageHeight
= rc
.bottom
;
78 // Update window position
79 SetWindowPos(hDlg
, NULL
, 15, 30, 0, 0, SWP_NOACTIVATE
|SWP_NOOWNERZORDER
|SWP_NOSIZE
|SWP_NOZORDER
);
82 // Get handles to the controls
84 hProcessPageListCtrl
= GetDlgItem(hDlg
, IDC_PROCESSLIST
);
85 hProcessPageHeaderCtrl
= ListView_GetHeader(hProcessPageListCtrl
);
86 hProcessPageEndProcessButton
= GetDlgItem(hDlg
, IDC_ENDPROCESS
);
87 hProcessPageShowAllProcessesButton
= GetDlgItem(hDlg
, IDC_SHOWALLPROCESSES
);
90 // Set the font, title, and extended window styles for the list control
92 SendMessage(hProcessPageListCtrl
, WM_SETFONT
, SendMessage(hProcessPage
, WM_GETFONT
, 0, 0), TRUE
);
93 SetWindowText(hProcessPageListCtrl
, "Processes");
94 ListView_SetExtendedListViewStyle(hProcessPageListCtrl
, ListView_GetExtendedListViewStyle(hProcessPageListCtrl
) | LVS_EX_FULLROWSELECT
| LVS_EX_HEADERDRAGDROP
);
99 // Subclass the process list control so we can intercept WM_ERASEBKGND
101 OldProcessListWndProc
= SetWindowLong(hProcessPageListCtrl
, GWL_WNDPROC
, (LONG
)ProcessListWndProc
);
103 // Start our refresh thread
104 _beginthread(ProcessPageRefreshThread
, 0, NULL
);
109 // Close the event handle, this will make the
110 // refresh thread exit when the wait fails
111 CloseHandle(hProcessPageEvent
);
113 SaveColumnSettings();
123 if (wParam
== SIZE_MINIMIZED
)
128 nXDifference
= cx
- nProcessPageWidth
;
129 nYDifference
= cy
- nProcessPageHeight
;
130 nProcessPageWidth
= cx
;
131 nProcessPageHeight
= cy
;
133 // Reposition the application page's controls
134 GetWindowRect(hProcessPageListCtrl
, &rc
);
135 cx
= (rc
.right
- rc
.left
) + nXDifference
;
136 cy
= (rc
.bottom
- rc
.top
) + nYDifference
;
137 SetWindowPos(hProcessPageListCtrl
, NULL
, 0, 0, cx
, cy
, SWP_NOACTIVATE
|SWP_NOOWNERZORDER
|SWP_NOMOVE
|SWP_NOZORDER
);
138 InvalidateRect(hProcessPageListCtrl
, NULL
, TRUE
);
140 GetClientRect(hProcessPageEndProcessButton
, &rc
);
141 MapWindowPoints(hProcessPageEndProcessButton
, hDlg
, (LPPOINT
)(&rc
), (sizeof(RECT
)/sizeof(POINT
)) );
142 cx
= rc
.left
+ nXDifference
;
143 cy
= rc
.top
+ nYDifference
;
144 SetWindowPos(hProcessPageEndProcessButton
, NULL
, cx
, cy
, 0, 0, SWP_NOACTIVATE
|SWP_NOOWNERZORDER
|SWP_NOSIZE
|SWP_NOZORDER
);
145 InvalidateRect(hProcessPageEndProcessButton
, NULL
, TRUE
);
147 GetClientRect(hProcessPageShowAllProcessesButton
, &rc
);
148 MapWindowPoints(hProcessPageShowAllProcessesButton
, hDlg
, (LPPOINT
)(&rc
), (sizeof(RECT
)/sizeof(POINT
)) );
150 cy
= rc
.top
+ nYDifference
;
151 SetWindowPos(hProcessPageShowAllProcessesButton
, NULL
, cx
, cy
, 0, 0, SWP_NOACTIVATE
|SWP_NOOWNERZORDER
|SWP_NOSIZE
|SWP_NOZORDER
);
152 InvalidateRect(hProcessPageShowAllProcessesButton
, NULL
, TRUE
);
158 ProcessPageOnNotify(wParam
, lParam
);
165 void ProcessPageOnNotify(WPARAM wParam
, LPARAM lParam
)
175 IO_COUNTERS iocounters
;
178 idctrl
= (int) wParam
;
179 pnmh
= (LPNMHDR
) lParam
;
180 pnmv
= (LPNMLISTVIEW
) lParam
;
181 pnmdi
= (NMLVDISPINFO
*) lParam
;
182 pnmhdr
= (LPNMHEADER
) lParam
;
184 if (pnmh
->hwndFrom
== hProcessPageListCtrl
)
188 /*case LVN_ITEMCHANGED:
192 case LVN_GETDISPINFO
:
194 if (!(pnmdi
->item
.mask
& LVIF_TEXT
))
197 ColumnIndex
= pnmdi
->item
.iSubItem
;
198 Index
= pnmdi
->item
.iItem
;
200 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IMAGENAME
)
201 PerfDataGetImageName(Index
, pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
202 if (ColumnDataHints
[ColumnIndex
] == COLUMN_PID
)
203 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetProcessId(Index
));
204 if (ColumnDataHints
[ColumnIndex
] == COLUMN_USERNAME
)
205 PerfDataGetUserName(Index
, pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
206 if (ColumnDataHints
[ColumnIndex
] == COLUMN_SESSIONID
)
207 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetSessionId(Index
));
208 if (ColumnDataHints
[ColumnIndex
] == COLUMN_CPUUSAGE
)
209 wsprintf(pnmdi
->item
.pszText
, _T("%02d"), PerfDataGetCPUUsage(Index
));
210 if (ColumnDataHints
[ColumnIndex
] == COLUMN_CPUTIME
)
212 time
= PerfDataGetCPUTime(Index
);
214 DWORD dwHours
= (DWORD
)(time
.QuadPart
/ 36000000000L);
215 DWORD dwMinutes
= (DWORD
)((time
.QuadPart
% 36000000000L) / 600000000L);
216 DWORD dwSeconds
= (DWORD
)(((time
.QuadPart
% 36000000000L) % 600000000L) / 10000000L);
218 DWORD dwHours
= (DWORD
)(time
.QuadPart
/ 36000000000LL);
219 DWORD dwMinutes
= (DWORD
)((time
.QuadPart
% 36000000000LL) / 600000000LL);
220 DWORD dwSeconds
= (DWORD
)(((time
.QuadPart
% 36000000000LL) % 600000000LL) / 10000000LL);
222 wsprintf(pnmdi
->item
.pszText
, _T("%d:%02d:%02d"), dwHours
, dwMinutes
, dwSeconds
);
224 if (ColumnDataHints
[ColumnIndex
] == COLUMN_MEMORYUSAGE
)
226 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetWorkingSetSizeBytes(Index
) / 1024);
227 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
228 _tcscat(pnmdi
->item
.pszText
, _T(" K"));
230 if (ColumnDataHints
[ColumnIndex
] == COLUMN_PEAKMEMORYUSAGE
)
232 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetPeakWorkingSetSizeBytes(Index
) / 1024);
233 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
234 _tcscat(pnmdi
->item
.pszText
, _T(" K"));
236 if (ColumnDataHints
[ColumnIndex
] == COLUMN_MEMORYUSAGEDELTA
)
238 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetWorkingSetSizeDelta(Index
) / 1024);
239 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
240 _tcscat(pnmdi
->item
.pszText
, _T(" K"));
242 if (ColumnDataHints
[ColumnIndex
] == COLUMN_PAGEFAULTS
)
244 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetPageFaultCount(Index
));
245 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
247 if (ColumnDataHints
[ColumnIndex
] == COLUMN_PAGEFAULTSDELTA
)
249 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetPageFaultCountDelta(Index
));
250 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
252 if (ColumnDataHints
[ColumnIndex
] == COLUMN_VIRTUALMEMORYSIZE
)
254 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetVirtualMemorySizeBytes(Index
) / 1024);
255 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
256 _tcscat(pnmdi
->item
.pszText
, _T(" K"));
258 if (ColumnDataHints
[ColumnIndex
] == COLUMN_PAGEDPOOL
)
260 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetPagedPoolUsagePages(Index
) / 1024);
261 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
262 _tcscat(pnmdi
->item
.pszText
, _T(" K"));
264 if (ColumnDataHints
[ColumnIndex
] == COLUMN_NONPAGEDPOOL
)
266 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetNonPagedPoolUsagePages(Index
) / 1024);
267 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
268 _tcscat(pnmdi
->item
.pszText
, _T(" K"));
270 if (ColumnDataHints
[ColumnIndex
] == COLUMN_BASEPRIORITY
)
271 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetBasePriority(Index
));
272 if (ColumnDataHints
[ColumnIndex
] == COLUMN_HANDLECOUNT
)
274 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetHandleCount(Index
));
275 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
277 if (ColumnDataHints
[ColumnIndex
] == COLUMN_THREADCOUNT
)
279 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetThreadCount(Index
));
280 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
282 if (ColumnDataHints
[ColumnIndex
] == COLUMN_USEROBJECTS
)
284 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetUSERObjectCount(Index
));
285 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
287 if (ColumnDataHints
[ColumnIndex
] == COLUMN_GDIOBJECTS
)
289 wsprintf(pnmdi
->item
.pszText
, _T("%d"), PerfDataGetGDIObjectCount(Index
));
290 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
292 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IOREADS
)
294 PerfDataGetIOCounters(Index
, &iocounters
);
295 //wsprintf(pnmdi->item.pszText, _T("%d"), iocounters.ReadOperationCount);
296 _ui64toa(iocounters
.ReadOperationCount
, pnmdi
->item
.pszText
, 10);
297 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
299 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IOWRITES
)
301 PerfDataGetIOCounters(Index
, &iocounters
);
302 //wsprintf(pnmdi->item.pszText, _T("%d"), iocounters.WriteOperationCount);
303 _ui64toa(iocounters
.WriteOperationCount
, pnmdi
->item
.pszText
, 10);
304 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
306 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IOOTHER
)
308 PerfDataGetIOCounters(Index
, &iocounters
);
309 //wsprintf(pnmdi->item.pszText, _T("%d"), iocounters.OtherOperationCount);
310 _ui64toa(iocounters
.OtherOperationCount
, pnmdi
->item
.pszText
, 10);
311 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
313 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IOREADBYTES
)
315 PerfDataGetIOCounters(Index
, &iocounters
);
316 //wsprintf(pnmdi->item.pszText, _T("%d"), iocounters.ReadTransferCount);
317 _ui64toa(iocounters
.ReadTransferCount
, pnmdi
->item
.pszText
, 10);
318 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
320 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IOWRITEBYTES
)
322 PerfDataGetIOCounters(Index
, &iocounters
);
323 //wsprintf(pnmdi->item.pszText, _T("%d"), iocounters.WriteTransferCount);
324 _ui64toa(iocounters
.WriteTransferCount
, pnmdi
->item
.pszText
, 10);
325 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
327 if (ColumnDataHints
[ColumnIndex
] == COLUMN_IOOTHERBYTES
)
329 PerfDataGetIOCounters(Index
, &iocounters
);
330 //wsprintf(pnmdi->item.pszText, _T("%d"), iocounters.OtherTransferCount);
331 _ui64toa(iocounters
.OtherTransferCount
, pnmdi
->item
.pszText
, 10);
332 CommaSeparateNumberString(pnmdi
->item
.pszText
, pnmdi
->item
.cchTextMax
);
339 for (Index
=0; Index
<(ULONG
)ListView_GetItemCount(hProcessPageListCtrl
); Index
++)
341 memset(&lvitem
, 0, sizeof(LVITEM
));
343 lvitem
.mask
= LVIF_STATE
;
344 lvitem
.stateMask
= LVIS_SELECTED
;
345 lvitem
.iItem
= Index
;
347 ListView_GetItem(hProcessPageListCtrl
, &lvitem
);
349 if (lvitem
.state
& LVIS_SELECTED
)
353 if ((ListView_GetSelectedCount(hProcessPageListCtrl
) == 1) &&
354 (PerfDataGetProcessId(Index
) != 0))
356 ProcessPageShowContextMenu(PerfDataGetProcessId(Index
));
363 else if (pnmh
->hwndFrom
== hProcessPageHeaderCtrl
)
370 // FIXME: Fix the column sorting
372 //ListView_SortItems(hApplicationPageListCtrl, ApplicationPageCompareFunc, NULL);
373 //bSortAscending = !bSortAscending;
377 case HDN_ITEMCHANGED
:
379 UpdateColumnDataHints();
385 UpdateColumnDataHints();
394 void CommaSeparateNumberString(LPTSTR strNumber
, int nMaxCount
)
399 for (i
=0,j
=0; i
<(_tcslen(strNumber
) % 3); i
++, j
++)
400 temp
[j
] = strNumber
[i
];
402 for (k
=0; i
<_tcslen(strNumber
); i
++,j
++,k
++)
404 if ((k
% 3 == 0) && (j
> 0))
407 temp
[j
] = strNumber
[i
];
412 _tcsncpy(strNumber
, temp
, nMaxCount
);
415 void ProcessPageShowContextMenu(DWORD dwProcessId
)
423 DWORD dwProcessPriorityClass
;
424 TCHAR strDebugger
[260];
425 DWORD dwDebuggerSize
;
429 memset(&si
, 0, sizeof(SYSTEM_INFO
));
434 hMenu
= LoadMenu(hInst
, MAKEINTRESOURCE(IDR_PROCESS_PAGE_CONTEXT
));
435 hSubMenu
= GetSubMenu(hMenu
, 0);
436 hPriorityMenu
= GetSubMenu(hSubMenu
, 4);
438 hProcess
= OpenProcess(PROCESS_QUERY_INFORMATION
, FALSE
, dwProcessId
);
439 dwProcessPriorityClass
= GetPriorityClass(hProcess
);
440 CloseHandle(hProcess
);
442 if (si
.dwNumberOfProcessors
< 2)
443 RemoveMenu(hSubMenu
, ID_PROCESS_PAGE_SETAFFINITY
, MF_BYCOMMAND
);
445 switch (dwProcessPriorityClass
)
447 case REALTIME_PRIORITY_CLASS
:
448 CheckMenuRadioItem(hPriorityMenu
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, MF_BYCOMMAND
);
450 case HIGH_PRIORITY_CLASS
:
451 CheckMenuRadioItem(hPriorityMenu
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, ID_PROCESS_PAGE_SETPRIORITY_HIGH
, MF_BYCOMMAND
);
453 case ABOVE_NORMAL_PRIORITY_CLASS
:
454 CheckMenuRadioItem(hPriorityMenu
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
, MF_BYCOMMAND
);
456 case NORMAL_PRIORITY_CLASS
:
457 CheckMenuRadioItem(hPriorityMenu
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, ID_PROCESS_PAGE_SETPRIORITY_NORMAL
, MF_BYCOMMAND
);
459 case BELOW_NORMAL_PRIORITY_CLASS
:
460 CheckMenuRadioItem(hPriorityMenu
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
, MF_BYCOMMAND
);
462 case IDLE_PRIORITY_CLASS
:
463 CheckMenuRadioItem(hPriorityMenu
, ID_PROCESS_PAGE_SETPRIORITY_REALTIME
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, ID_PROCESS_PAGE_SETPRIORITY_LOW
, MF_BYCOMMAND
);
467 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE
, "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", 0, KEY_READ
, &hKey
) == ERROR_SUCCESS
)
469 dwDebuggerSize
= 260;
470 if (RegQueryValueEx(hKey
, "Debugger", NULL
, NULL
, (LPBYTE
)strDebugger
, &dwDebuggerSize
) == ERROR_SUCCESS
)
472 for (Idx
=0; Idx
<strlen(strDebugger
); Idx
++)
473 strDebugger
[Idx
] = toupper(strDebugger
[Idx
]);
475 if (strstr(strDebugger
, "DRWTSN32"))
476 EnableMenuItem(hSubMenu
, ID_PROCESS_PAGE_DEBUG
, MF_BYCOMMAND
|MF_DISABLED
|MF_GRAYED
);
479 EnableMenuItem(hSubMenu
, ID_PROCESS_PAGE_DEBUG
, MF_BYCOMMAND
|MF_DISABLED
|MF_GRAYED
);
484 EnableMenuItem(hSubMenu
, ID_PROCESS_PAGE_DEBUG
, MF_BYCOMMAND
|MF_DISABLED
|MF_GRAYED
);
486 TrackPopupMenu(hSubMenu
, TPM_LEFTALIGN
|TPM_TOPALIGN
|TPM_LEFTBUTTON
, pt
.x
, pt
.y
, 0, hMainWnd
, NULL
);
491 void RefreshProcessPage(void)
493 // Signal the event so that our refresh thread
494 // will wake up and refresh the process page
495 SetEvent(hProcessPageEvent
);
498 void ProcessPageRefreshThread(void *lpParameter
)
500 ULONG OldProcessorUsage
= 0;
501 ULONG OldProcessCount
= 0;
504 hProcessPageEvent
= CreateEvent(NULL
, TRUE
, TRUE
, "Process Page Event");
506 // If we couldn't create the event then exit the thread
507 if (!hProcessPageEvent
)
515 dwWaitVal
= WaitForSingleObject(hProcessPageEvent
, INFINITE
);
517 // If the wait failed then the event object must have been
518 // closed and the task manager is exiting so exit this thread
519 if (dwWaitVal
== WAIT_FAILED
)
522 if (dwWaitVal
== WAIT_OBJECT_0
)
525 ResetEvent(hProcessPageEvent
);
527 if ((ULONG
)SendMessage(hProcessPageListCtrl
, LVM_GETITEMCOUNT
, 0, 0) != PerfDataGetProcessCount())
528 SendMessage(hProcessPageListCtrl
, LVM_SETITEMCOUNT
, PerfDataGetProcessCount(), /*LVSICF_NOINVALIDATEALL|*/LVSICF_NOSCROLL
);
530 if (IsWindowVisible(hProcessPage
))
531 InvalidateRect(hProcessPageListCtrl
, NULL
, FALSE
);
535 if (OldProcessorUsage
!= PerfDataGetProcessorUsage())
537 OldProcessorUsage
= PerfDataGetProcessorUsage();
538 wsprintf(text
, _T("CPU Usage: %3d%%"), OldProcessorUsage
);
539 SendMessage(hStatusWnd
, SB_SETTEXT
, 1, (LPARAM
)text
);
541 if (OldProcessCount
!= PerfDataGetProcessCount())
543 OldProcessCount
= PerfDataGetProcessCount();
544 wsprintf(text
, _T("Processes: %d"), OldProcessCount
);
545 SendMessage(hStatusWnd
, SB_SETTEXT
, 0, (LPARAM
)text
);