ReactOS 0.4.15-dev-7961-gdcf9eb0
perfpage.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Task Manager
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Performance Page
5 * COPYRIGHT: Copyright 1999-2001 Brian Palmer <brianp@reactos.org>
6 */
7
8#include "precomp.h"
9#include <shlwapi.h>
10
13
14HWND hPerformancePage; /* Performance Property Page */
15static HWND hCpuUsageGraph; /* CPU Usage Graph */
16static HWND hMemUsageGraph; /* MEM Usage Graph */
17HWND hPerformancePageCpuUsageHistoryGraph; /* CPU Usage History Graph */
18HWND hPerformancePageMemUsageHistoryGraph; /* Memory Usage History Graph */
19static HWND hTotalsFrame; /* Totals Frame */
20static HWND hCommitChargeFrame; /* Commit Charge Frame */
21static HWND hKernelMemoryFrame; /* Kernel Memory Frame */
22static HWND hPhysicalMemoryFrame; /* Physical Memory Frame */
27static HWND hCommitChargeTotalEdit; /* Commit Charge Total Edit Control */
28static HWND hCommitChargeLimitEdit; /* Commit Charge Limit Edit Control */
29static HWND hCommitChargePeakEdit; /* Commit Charge Peak Edit Control */
30static HWND hKernelMemoryTotalEdit; /* Kernel Memory Total Edit Control */
31static HWND hKernelMemoryPagedEdit; /* Kernel Memory Paged Edit Control */
32static HWND hKernelMemoryNonPagedEdit; /* Kernel Memory NonPaged Edit Control */
33static HWND hPhysicalMemoryTotalEdit; /* Physical Memory Total Edit Control */
34static HWND hPhysicalMemoryAvailableEdit; /* Physical Memory Available Edit Control */
35static HWND hPhysicalMemorySystemCacheEdit; /* Physical Memory System Cache Edit Control */
36static HWND hTotalsHandleCountEdit; /* Total Handles Edit Control */
37static HWND hTotalsProcessCountEdit; /* Total Processes Edit Control */
38static HWND hTotalsThreadCountEdit; /* Total Threads Edit Control */
39
40#ifdef RUN_PERF_PAGE
43#endif
44
47static int lastX, lastY;
49
50void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int pos)
51{
52 RECT rc;
53 int cx, cy, sx, sy;
54
55 GetClientRect(hCntrl, &rc);
56 MapWindowPoints(hCntrl, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
57 if (pos) {
58 cx = rc.left;
59 cy = rc.top;
60 sx = rc.right - rc.left;
61 switch (pos) {
62 case 1:
63 break;
64 case 2:
65 cy += nYDifference / 2;
66 break;
67 case 3:
68 sx += nXDifference;
69 break;
70 case 4:
71 cy += nYDifference / 2;
72 sx += nXDifference;
73 break;
74 }
75 sy = rc.bottom - rc.top + nYDifference / 2;
77 } else {
78 cx = rc.left + nXDifference;
79 cy = rc.top + nYDifference;
81 }
82 InvalidateRect(hCntrl, NULL, TRUE);
83}
84
85static inline
86void AdjustControlPosition(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
87{
88 AdjustFrameSize(hCntrl, hDlg, nXDifference, nYDifference, 0);
89}
90
91static inline
92void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
93{
94 AdjustFrameSize(GetDlgItem(hDlg, ctrl_id), hDlg, nXDifference, nYDifference, 0);
95}
96
99{
100 RECT rc;
101
102 switch (message)
103 {
104 case WM_DESTROY:
107#ifdef RUN_PERF_PAGE
109#endif
110 break;
111
112 case WM_INITDIALOG:
113 {
114 BOOL bGraph;
116
117 /* Save the width and height */
118 GetClientRect(hDlg, &rc);
121
122 /* Update window position */
124
125 /*
126 * Get handles to all the controls
127 */
132
137
150
155
156 /* Create the controls */
157 fmt.clrBack = RGB(0, 0, 0);
158 fmt.clrGrid = RGB(0, 128, 64);
159 fmt.clrPlot0 = RGB(0, 255, 0);
160 fmt.clrPlot1 = RGB(255, 0, 0);
161 fmt.GridCellWidth = fmt.GridCellHeight = 12;
162 fmt.DrawSecondaryPlot = TaskManagerSettings.ShowKernelTimes;
164 if (!bGraph)
165 {
166 EndDialog(hDlg, 0);
167 return FALSE;
168 }
169
170 fmt.clrPlot0 = RGB(255, 255, 0);
171 fmt.clrPlot1 = RGB(100, 255, 255);
172 fmt.DrawSecondaryPlot = TRUE;
174 if (!bGraph)
175 {
176 EndDialog(hDlg, 0);
177 return FALSE;
178 }
179
180 /* Start our refresh thread */
181#ifdef RUN_PERF_PAGE
183#endif
184
185 /*
186 * Subclass graph buttons
187 */
192 return TRUE;
193 }
194
195 case WM_COMMAND:
196 break;
197
198 case WM_SIZE:
199 {
200 int cx, cy;
201 int nXDifference;
202 int nYDifference;
203
204 if (wParam == SIZE_MINIMIZED)
205 return 0;
206
207 cx = LOWORD(lParam);
208 cy = HIWORD(lParam);
209 nXDifference = cx - nPerformancePageWidth;
210 nYDifference = cy - nPerformancePageHeight;
213
214 /* Reposition the performance page's controls */
215 AdjustFrameSize(hTotalsFrame, hDlg, 0, nYDifference, 0);
216 AdjustFrameSize(hCommitChargeFrame, hDlg, 0, nYDifference, 0);
217 AdjustFrameSize(hKernelMemoryFrame, hDlg, 0, nYDifference, 0);
218 AdjustFrameSize(hPhysicalMemoryFrame, hDlg, 0, nYDifference, 0);
219 AdjustCntrlPos(IDS_COMMIT_CHARGE_TOTAL, hDlg, 0, nYDifference);
220 AdjustCntrlPos(IDS_COMMIT_CHARGE_LIMIT, hDlg, 0, nYDifference);
221 AdjustCntrlPos(IDS_COMMIT_CHARGE_PEAK, hDlg, 0, nYDifference);
222 AdjustCntrlPos(IDS_KERNEL_MEMORY_TOTAL, hDlg, 0, nYDifference);
223 AdjustCntrlPos(IDS_KERNEL_MEMORY_PAGED, hDlg, 0, nYDifference);
224 AdjustCntrlPos(IDS_KERNEL_MEMORY_NONPAGED, hDlg, 0, nYDifference);
225 AdjustCntrlPos(IDS_PHYSICAL_MEMORY_TOTAL, hDlg, 0, nYDifference);
226 AdjustCntrlPos(IDS_PHYSICAL_MEMORY_AVAILABLE, hDlg, 0, nYDifference);
227 AdjustCntrlPos(IDS_PHYSICAL_MEMORY_SYSTEM_CACHE, hDlg, 0, nYDifference);
228 AdjustCntrlPos(IDS_TOTALS_HANDLE_COUNT, hDlg, 0, nYDifference);
229 AdjustCntrlPos(IDS_TOTALS_PROCESS_COUNT, hDlg, 0, nYDifference);
230 AdjustCntrlPos(IDS_TOTALS_THREAD_COUNT, hDlg, 0, nYDifference);
231
232 AdjustControlPosition(hCommitChargeTotalEdit, hDlg, 0, nYDifference);
233 AdjustControlPosition(hCommitChargeLimitEdit, hDlg, 0, nYDifference);
234 AdjustControlPosition(hCommitChargePeakEdit, hDlg, 0, nYDifference);
235 AdjustControlPosition(hKernelMemoryTotalEdit, hDlg, 0, nYDifference);
236 AdjustControlPosition(hKernelMemoryPagedEdit, hDlg, 0, nYDifference);
237 AdjustControlPosition(hKernelMemoryNonPagedEdit, hDlg, 0, nYDifference);
238 AdjustControlPosition(hPhysicalMemoryTotalEdit, hDlg, 0, nYDifference);
241 AdjustControlPosition(hTotalsHandleCountEdit, hDlg, 0, nYDifference);
242 AdjustControlPosition(hTotalsProcessCountEdit, hDlg, 0, nYDifference);
243 AdjustControlPosition(hTotalsThreadCountEdit, hDlg, 0, nYDifference);
244
245 nXDifference += lastX;
246 nYDifference += lastY;
247 lastX = lastY = 0;
248 if (nXDifference % 2)
249 {
250 if (nXDifference > 0)
251 {
252 nXDifference--;
253 lastX++;
254 }
255 else
256 {
257 nXDifference++;
258 lastX--;
259 }
260 }
261 if (nYDifference % 2)
262 {
263 if (nYDifference > 0)
264 {
265 nYDifference--;
266 lastY++;
267 }
268 else
269 {
270 nYDifference++;
271 lastY--;
272 }
273 }
274 AdjustFrameSize(hCpuUsageFrame, hDlg, nXDifference, nYDifference, 1);
275 AdjustFrameSize(hMemUsageFrame, hDlg, nXDifference, nYDifference, 2);
276 AdjustFrameSize(hCpuUsageHistoryFrame, hDlg, nXDifference, nYDifference, 3);
277 AdjustFrameSize(hMemUsageHistoryFrame, hDlg, nXDifference, nYDifference, 4);
278 AdjustFrameSize(hCpuUsageGraph, hDlg, nXDifference, nYDifference, 1);
279 AdjustFrameSize(hMemUsageGraph, hDlg, nXDifference, nYDifference, 2);
280 AdjustFrameSize(hPerformancePageCpuUsageHistoryGraph, hDlg, nXDifference, nYDifference, 3);
281 AdjustFrameSize(hPerformancePageMemUsageHistoryGraph, hDlg, nXDifference, nYDifference, 4);
282 break;
283 }
284 }
285 return 0;
286}
287
289{
290#ifdef RUN_PERF_PAGE
291 /* Signal the event so that our refresh thread
292 * will wake up and refresh the performance page */
294#endif
295}
296
298{
299 ULONGLONG CommitChargeTotal;
300 ULONGLONG CommitChargeLimit;
301 ULONGLONG CommitChargePeak;
302
303 ULONG CpuUsage;
304 ULONG CpuKernelUsage;
305
306 ULONGLONG KernelMemoryTotal;
307 ULONGLONG KernelMemoryPaged;
308 ULONGLONG KernelMemoryNonPaged;
309
310 ULONGLONG PhysicalMemoryTotal;
311 ULONGLONG PhysicalMemoryAvailable;
312 ULONGLONG PhysicalMemorySystemCache;
313
314 ULONG TotalHandles;
315 ULONG TotalThreads;
316 ULONG TotalProcesses;
317
318 MSG msg;
319
320 WCHAR Text[260];
321 WCHAR szMemUsage[256], szCpuUsage[256], szProcesses[256];
322
323 LoadStringW(hInst, IDS_STATUS_CPUUSAGE, szCpuUsage, _countof(szCpuUsage));
324 LoadStringW(hInst, IDS_STATUS_MEMUSAGE, szMemUsage, _countof(szMemUsage));
325 LoadStringW(hInst, IDS_STATUS_PROCESSES, szProcesses, _countof(szProcesses));
326
327 while (1)
328 {
329 extern BOOL bTrackMenu; // From taskmgr.c
330
331 int nBarsUsed1;
332 int nBarsUsed2;
333
334 WCHAR szChargeTotalFormat[256];
335 WCHAR szChargeLimitFormat[256];
336
337 /* Wait for an the event or application close */
338 if (GetMessage(&msg, NULL, 0, 0) <= 0)
339 return 0;
340
341 if (msg.message == WM_TIMER)
342 {
343 /*
344 * Update the commit charge info
345 */
346 CommitChargeTotal = PerfDataGetCommitChargeTotalK();
347 CommitChargeLimit = PerfDataGetCommitChargeLimitK();
348 CommitChargePeak = PerfDataGetCommitChargePeakK();
349 _ultow(CommitChargeTotal, Text, 10);
351 _ultow(CommitChargeLimit, Text, 10);
353 _ultow(CommitChargePeak, Text, 10);
355
356 StrFormatByteSizeW(CommitChargeTotal * 1024,
357 szChargeTotalFormat,
358 _countof(szChargeTotalFormat));
359
360 StrFormatByteSizeW(CommitChargeLimit * 1024,
361 szChargeLimitFormat,
362 _countof(szChargeLimitFormat));
363
364 if (!bTrackMenu)
365 {
366 wsprintfW(Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat,
367 (CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0));
369 }
370
371 /*
372 * Update the kernel memory info
373 */
374 KernelMemoryTotal = PerfDataGetKernelMemoryTotalK();
375 KernelMemoryPaged = PerfDataGetKernelMemoryPagedK();
376 KernelMemoryNonPaged = PerfDataGetKernelMemoryNonPagedK();
377 _ultow(KernelMemoryTotal, Text, 10);
379 _ultow(KernelMemoryPaged, Text, 10);
381 _ultow(KernelMemoryNonPaged, Text, 10);
383
384 /*
385 * Update the physical memory info
386 */
387 PhysicalMemoryTotal = PerfDataGetPhysicalMemoryTotalK();
388 PhysicalMemoryAvailable = PerfDataGetPhysicalMemoryAvailableK();
389 PhysicalMemorySystemCache = PerfDataGetPhysicalMemorySystemCacheK();
390 _ultow(PhysicalMemoryTotal, Text, 10);
392 _ultow(PhysicalMemoryAvailable, Text, 10);
394 _ultow(PhysicalMemorySystemCache, Text, 10);
396
397 /*
398 * Update the totals info
399 */
400 TotalHandles = PerfDataGetSystemHandleCount();
401 TotalThreads = PerfDataGetTotalThreadCount();
402 TotalProcesses = PerfDataGetProcessCount();
403 _ultow(TotalHandles, Text, 10);
405 _ultow(TotalThreads, Text, 10);
407 _ultow(TotalProcesses, Text, 10);
409 if (!bTrackMenu)
410 {
411 wsprintfW(Text, szProcesses, TotalProcesses);
413 }
414
415 /*
416 * Redraw the graphs
417 */
420
421 /*
422 * Get the CPU usage
423 */
424 CpuUsage = PerfDataGetProcessorUsage();
425 CpuKernelUsage = PerfDataGetProcessorSystemUsage();
426
427 if (!bTrackMenu)
428 {
429 wsprintfW(Text, szCpuUsage, CpuUsage);
431 }
432
433 /*
434 * Get the memory usage
435 */
436 CommitChargeTotal = PerfDataGetCommitChargeTotalK();
437 CommitChargeLimit = PerfDataGetCommitChargeLimitK();
438 nBarsUsed1 = CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0;
439
440 PhysicalMemoryTotal = PerfDataGetPhysicalMemoryTotalK();
441 PhysicalMemoryAvailable = PerfDataGetPhysicalMemoryAvailableK();
442 nBarsUsed2 = PhysicalMemoryTotal ? ((PhysicalMemoryAvailable * 100) / PhysicalMemoryTotal) : 0;
443
448 }
449 }
450 return 0;
451}
452
454{
455 HMENU hMenu;
456 HMENU hViewMenu;
457
458 hMenu = GetMenu(hMainWnd);
459 hViewMenu = GetSubMenu(hMenu, 2);
460
461 /* Check or uncheck the show 16-bit tasks menu item */
463 {
467 }
468 else
469 {
473 }
474
477}
478
480{
481 HMENU hMenu;
482 HMENU hViewMenu;
483 HMENU hCPUHistoryMenu;
484
485 hMenu = GetMenu(hMainWnd);
486 hViewMenu = GetSubMenu(hMenu, 2);
487 hCPUHistoryMenu = GetSubMenu(hViewMenu, 3);
488
491}
492
494{
495 HMENU hMenu;
496 HMENU hViewMenu;
497 HMENU hCPUHistoryMenu;
498
499 hMenu = GetMenu(hMainWnd);
500 hViewMenu = GetSubMenu(hMenu, 2);
501 hCPUHistoryMenu = GetSubMenu(hViewMenu, 3);
502
505}
#define msg(x)
Definition: auth_time.c:54
#define IDC_PHYSICAL_MEMORY_AVAILABLE
Definition: resource.h:77
#define IDS_STATUS_MEMUSAGE
Definition: resource.h:260
#define IDC_COMMIT_CHARGE_PEAK
Definition: resource.h:71
#define IDC_TOTALS_FRAME
Definition: resource.h:92
#define IDC_PHYSICAL_MEMORY_TOTAL
Definition: resource.h:74
#define IDC_KERNEL_MEMORY_TOTAL
Definition: resource.h:83
#define IDS_KERNEL_MEMORY_NONPAGED
Definition: resource.h:140
#define IDC_MEMORY_USAGE_HISTORY_FRAME
Definition: resource.h:116
#define IDS_PHYSICAL_MEMORY_SYSTEM_CACHE
Definition: resource.h:137
#define IDC_PHYSICAL_MEMORY_FRAME
Definition: resource.h:101
#define IDS_STATUS_CPUUSAGE
Definition: resource.h:261
#define ID_VIEW_SHOWKERNELTIMES
Definition: resource.h:166
#define IDS_TOTALS_THREAD_COUNT
Definition: resource.h:130
#define IDC_MEM_USAGE_HISTORY_GRAPH
Definition: resource.h:125
#define IDS_COMMIT_CHARGE_PEAK
Definition: resource.h:134
#define IDC_CPU_USAGE_HISTORY_FRAME
Definition: resource.h:113
#define IDC_MEM_USAGE_GRAPH
Definition: resource.h:123
#define IDC_CPU_USAGE_HISTORY_GRAPH
Definition: resource.h:126
#define IDS_PHYSICAL_MEMORY_AVAILABLE
Definition: resource.h:136
#define ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU
Definition: resource.h:168
#define IDS_KERNEL_MEMORY_TOTAL
Definition: resource.h:138
#define IDS_PHYSICAL_MEMORY_TOTAL
Definition: resource.h:135
#define IDC_COMMIT_CHARGE_TOTAL
Definition: resource.h:64
#define IDC_MEM_USAGE_FRAME
Definition: resource.h:110
#define IDS_KERNEL_MEMORY_PAGED
Definition: resource.h:139
#define IDS_TOTALS_PROCESS_COUNT
Definition: resource.h:131
#define IDC_KERNEL_MEMORY_FRAME
Definition: resource.h:98
#define IDC_TOTALS_HANDLE_COUNT
Definition: resource.h:53
#define ID_VIEW_CPUHISTORY_ONEGRAPHALL
Definition: resource.h:167
#define IDC_KERNEL_MEMORY_NONPAGED
Definition: resource.h:89
#define IDS_COMMIT_CHARGE_TOTAL
Definition: resource.h:132
#define IDC_COMMIT_CHARGE_LIMIT
Definition: resource.h:67
#define IDS_TOTALS_HANDLE_COUNT
Definition: resource.h:129
#define IDC_CPU_USAGE_GRAPH
Definition: resource.h:119
#define IDC_KERNEL_MEMORY_PAGED
Definition: resource.h:86
#define IDC_CPU_USAGE_FRAME
Definition: resource.h:107
#define IDC_TOTALS_PROCESS_COUNT
Definition: resource.h:61
#define IDS_COMMIT_CHARGE_LIMIT
Definition: resource.h:133
#define IDS_STATUS_PROCESSES
Definition: resource.h:262
#define IDC_COMMIT_CHARGE_FRAME
Definition: resource.h:95
#define IDC_TOTALS_THREAD_COUNT
Definition: resource.h:58
#define IDC_PHYSICAL_MEMORY_SYSTEM_CACHE
Definition: resource.h:80
HWND hStatusWnd
Definition: charmap.c:22
WPARAM wParam
Definition: combotst.c:138
char * Text
Definition: combotst.c:136
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2388
#define RGB(r, g, b)
Definition: precomp.h:71
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
INT_PTR CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: graph.c:19
WNDPROC OldGraphWndProc
Definition: graph.c:12
WNDPROC OldGraphCtrlWndProc
Definition: graphctl.c:14
void GraphCtrl_AddPoint(PTM_GRAPH_CONTROL inst, BYTE val0, BYTE val1)
Definition: graphctl.c:140
BOOL GraphCtrl_Create(PTM_GRAPH_CONTROL inst, HWND hWnd, HWND hParentWnd, PTM_FORMAT fmt)
Definition: graphctl.c:17
void GraphCtrl_RedrawBitmap(PTM_GRAPH_CONTROL inst, INT h)
Definition: graphctl.c:210
void GraphCtrl_Dispose(PTM_GRAPH_CONTROL inst)
Definition: graphctl.c:115
INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: graphctl.c:301
_CRTIMP wchar_t *__cdecl _ultow(_In_ unsigned long _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
HWND hMainWnd
Definition: magnifier.c:32
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
ULONG PerfDataGetKernelMemoryNonPagedK(void)
Definition: perfdata.c:1010
ULONG PerfDataGetSystemHandleCount(void)
Definition: perfdata.c:1076
ULONG PerfDataGetPhysicalMemoryTotalK(void)
Definition: perfdata.c:1027
ULONG PerfDataGetTotalThreadCount(void)
Definition: perfdata.c:1089
ULONG PerfDataGetCommitChargePeakK(void)
Definition: perfdata.c:953
ULONG PerfDataGetProcessorSystemUsage(void)
Definition: perfdata.c:464
ULONG PerfDataGetProcessorUsage(void)
Definition: perfdata.c:455
ULONG PerfDataGetKernelMemoryPagedK(void)
Definition: perfdata.c:993
ULONG PerfDataGetKernelMemoryTotalK(void)
Definition: perfdata.c:970
ULONG PerfDataGetCommitChargeLimitK(void)
Definition: perfdata.c:936
ULONG PerfDataGetPhysicalMemoryAvailableK(void)
Definition: perfdata.c:1044
ULONG PerfDataGetCommitChargeTotalK(void)
Definition: perfdata.c:919
ULONG PerfDataGetProcessCount(void)
Definition: perfdata.c:446
ULONG PerfDataGetPhysicalMemorySystemCacheK(void)
Definition: perfdata.c:1061
static HWND hPhysicalMemoryTotalEdit
Definition: perfpage.c:33
static HWND hCommitChargeLimitEdit
Definition: perfpage.c:28
static HWND hTotalsThreadCountEdit
Definition: perfpage.c:38
HWND hPerformancePageMemUsageHistoryGraph
Definition: perfpage.c:18
static HWND hKernelMemoryPagedEdit
Definition: perfpage.c:31
static int nPerformancePageHeight
Definition: perfpage.c:46
HWND hPerformancePageCpuUsageHistoryGraph
Definition: perfpage.c:17
TM_GRAPH_CONTROL PerformancePageMemUsageHistoryGraph
Definition: perfpage.c:12
void PerformancePage_OnViewShowKernelTimes(void)
Definition: perfpage.c:453
static HWND hCpuUsageHistoryFrame
Definition: perfpage.c:25
DWORD WINAPI PerformancePageRefreshThread(PVOID Parameter)
Definition: perfpage.c:297
INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: perfpage.c:98
static HWND hMemUsageGraph
Definition: perfpage.c:16
static HWND hMemUsageHistoryFrame
Definition: perfpage.c:26
static void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
Definition: perfpage.c:92
static HWND hCommitChargePeakEdit
Definition: perfpage.c:29
static HWND hPhysicalMemoryAvailableEdit
Definition: perfpage.c:34
static HWND hTotalsHandleCountEdit
Definition: perfpage.c:36
void PerformancePage_OnViewCPUHistoryOneGraphPerCPU(void)
Definition: perfpage.c:493
static HWND hCommitChargeTotalEdit
Definition: perfpage.c:27
static HWND hCpuUsageGraph
Definition: perfpage.c:15
static HWND hKernelMemoryTotalEdit
Definition: perfpage.c:30
static HWND hPhysicalMemoryFrame
Definition: perfpage.c:22
static HANDLE hPerformanceThread
Definition: perfpage.c:41
TM_GRAPH_CONTROL PerformancePageCpuUsageHistoryGraph
Definition: perfpage.c:11
static int lastX
Definition: perfpage.c:47
static HWND hKernelMemoryNonPagedEdit
Definition: perfpage.c:32
void PerformancePage_OnViewCPUHistoryOneGraphAll(void)
Definition: perfpage.c:479
static int nPerformancePageWidth
Definition: perfpage.c:45
static HWND hTotalsFrame
Definition: perfpage.c:19
void RefreshPerformancePage(void)
Definition: perfpage.c:288
void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int pos)
Definition: perfpage.c:50
static DWORD dwPerformanceThread
Definition: perfpage.c:42
static void AdjustControlPosition(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
Definition: perfpage.c:86
static HWND hCpuUsageFrame
Definition: perfpage.c:23
static HWND hCommitChargeFrame
Definition: perfpage.c:20
static HWND hMemUsageFrame
Definition: perfpage.c:24
static int lastY
Definition: perfpage.c:47
static HWND hKernelMemoryFrame
Definition: perfpage.c:21
static HWND hTotalsProcessCountEdit
Definition: perfpage.c:37
HWND hPerformancePage
Definition: perfpage.c:14
static HWND hPhysicalMemorySystemCacheEdit
Definition: perfpage.c:35
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define SB_SETTEXT
Definition: commctrl.h:1949
#define _countof(array)
Definition: sndvol32.h:68
BOOL CPUHistory_OneGraphPerCPU
Definition: taskmgr.h:54
BOOL DrawSecondaryPlot
Definition: graphctl.h:41
Definition: dsound.c:943
Definition: tftpd.h:60
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
Definition: taskmgr.c:1109
TASKMANAGER_SETTINGS TaskManagerSettings
Definition: taskmgr.c:37
BOOL bTrackMenu
Definition: taskmgr.c:34
#define GWLP_WNDPROC
Definition: treelist.c:66
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define HIWORD(l)
Definition: typedefs.h:247
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define SWP_NOACTIVATE
Definition: winuser.h:1242
#define MF_BYCOMMAND
Definition: winuser.h:202
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_SIZE
Definition: winuser.h:1611
#define WM_COMMAND
Definition: winuser.h:1740
#define MF_CHECKED
Definition: winuser.h:132
#define SWP_NOSIZE
Definition: winuser.h:1245
#define SIZE_MINIMIZED
Definition: winuser.h:2506
#define WM_INITDIALOG
Definition: winuser.h:1739
#define PostThreadMessage
Definition: winuser.h:5833
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define MF_UNCHECKED
Definition: winuser.h:204
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define GetMessage
Definition: winuser.h:5790
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_TIMER
Definition: winuser.h:1742
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1249
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2906
#define SWP_NOZORDER
Definition: winuser.h:1247
#define SetWindowLongPtrW
Definition: winuser.h:5346
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI GetMenu(_In_ HWND)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323
__wchar_t WCHAR
Definition: xmlstorage.h:180