82 cy += nYDifference / 2;
88 cy += nYDifference / 2;
92 sy = rc.
bottom - rc.
top + nYDifference / 2;
95 cx = rc.
left + nXDifference;
96 cy = rc.
top + nYDifference;
175 fmt.clrBack =
RGB(0, 0, 0);
176 fmt.clrGrid =
RGB(0, 128, 64);
177 fmt.clrPlot0 =
RGB(0, 255, 0);
178 fmt.clrPlot1 =
RGB(255, 0, 0);
179 fmt.GridCellWidth =
fmt.GridCellHeight = 12;
188 fmt.clrPlot0 =
RGB(255, 255, 0);
189 fmt.clrPlot1 =
RGB(100, 255, 255);
276 nXDifference +=
lastX;
277 nYDifference +=
lastY;
279 if (nXDifference % 2) {
280 if (nXDifference > 0) {
288 if (nYDifference % 2) {
289 if (nYDifference > 0) {
326 ULONG CpuKernelUsage;
338 ULONG TotalProcesses;
343 WCHAR szMemUsage[256], szCpuUsage[256], szProcesses[256];
354 WCHAR szChargeTotalFormat[256];
355 WCHAR szChargeLimitFormat[256];
386 wsprintfW(
Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat,
387 (CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0));
445 if (CpuUsage <= 0 ) CpuUsage = 0;
446 if (CpuUsage > 100) CpuUsage = 100;
455 if (CpuKernelUsage <= 0)
457 else if (CpuKernelUsage > 100)
458 CpuKernelUsage = 100;
465 nBarsUsed1 = CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0;
469 nBarsUsed2 = PhysicalMemoryTotal ? ((PhysicalMemoryAvailable * 100) / PhysicalMemoryTotal) : 0;
510 HMENU hCPUHistoryMenu;
524 HMENU hCPUHistoryMenu;
#define IDC_PHYSICAL_MEMORY_AVAILABLE
#define IDS_STATUS_MEMUSAGE
#define IDC_COMMIT_CHARGE_PEAK
#define IDC_PHYSICAL_MEMORY_TOTAL
#define IDC_KERNEL_MEMORY_TOTAL
#define IDS_KERNEL_MEMORY_NONPAGED
#define IDC_MEMORY_USAGE_HISTORY_FRAME
#define IDS_PHYSICAL_MEMORY_SYSTEM_CACHE
#define IDC_PHYSICAL_MEMORY_FRAME
#define IDS_STATUS_CPUUSAGE
#define ID_VIEW_SHOWKERNELTIMES
#define IDS_TOTALS_THREAD_COUNT
#define IDC_MEM_USAGE_HISTORY_GRAPH
#define IDS_COMMIT_CHARGE_PEAK
#define IDC_CPU_USAGE_HISTORY_FRAME
#define IDC_MEM_USAGE_GRAPH
#define IDC_CPU_USAGE_HISTORY_GRAPH
#define IDS_PHYSICAL_MEMORY_AVAILABLE
#define ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU
#define IDS_KERNEL_MEMORY_TOTAL
#define IDS_PHYSICAL_MEMORY_TOTAL
#define IDC_COMMIT_CHARGE_TOTAL
#define IDC_MEM_USAGE_FRAME
#define IDS_KERNEL_MEMORY_PAGED
#define IDS_TOTALS_PROCESS_COUNT
#define IDC_KERNEL_MEMORY_FRAME
#define IDC_TOTALS_HANDLE_COUNT
#define ID_VIEW_CPUHISTORY_ONEGRAPHALL
#define IDC_KERNEL_MEMORY_NONPAGED
#define IDS_COMMIT_CHARGE_TOTAL
#define IDC_COMMIT_CHARGE_LIMIT
#define IDS_TOTALS_HANDLE_COUNT
#define IDC_CPU_USAGE_GRAPH
#define IDC_KERNEL_MEMORY_PAGED
#define IDC_CPU_USAGE_FRAME
#define IDC_TOTALS_PROCESS_COUNT
#define IDS_COMMIT_CHARGE_LIMIT
#define IDS_STATUS_PROCESSES
#define IDC_COMMIT_CHARGE_FRAME
#define IDC_TOTALS_THREAD_COUNT
#define IDC_PHYSICAL_MEMORY_SYSTEM_CACHE
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)
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
INT_PTR CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
WNDPROC OldGraphCtrlWndProc
void GraphCtrl_AddPoint(PTM_GRAPH_CONTROL inst, BYTE val0, BYTE val1)
BOOL GraphCtrl_Create(PTM_GRAPH_CONTROL inst, HWND hWnd, HWND hParentWnd, PTM_FORMAT fmt)
void GraphCtrl_RedrawBitmap(PTM_GRAPH_CONTROL inst, INT h)
void GraphCtrl_Dispose(PTM_GRAPH_CONTROL inst)
INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
_CRTIMP wchar_t *__cdecl _ultow(_In_ unsigned long _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
ULONG PerfDataGetKernelMemoryNonPagedK(void)
ULONG PerfDataGetSystemHandleCount(void)
ULONG PerfDataGetPhysicalMemoryTotalK(void)
ULONG PerfDataGetTotalThreadCount(void)
ULONG PerfDataGetCommitChargePeakK(void)
ULONG PerfDataGetProcessorSystemUsage(void)
ULONG PerfDataGetProcessorUsage(void)
ULONG PerfDataGetKernelMemoryPagedK(void)
ULONG PerfDataGetKernelMemoryTotalK(void)
ULONG PerfDataGetCommitChargeLimitK(void)
ULONG PerfDataGetPhysicalMemoryAvailableK(void)
ULONG PerfDataGetCommitChargeTotalK(void)
ULONG PerfDataGetProcessCount(void)
ULONG PerfDataGetPhysicalMemorySystemCacheK(void)
HWND hPerformancePageMemUsageHistoryGraph
static int nPerformancePageHeight
HWND hPerformancePageCpuUsageHistoryGraph
HWND hPerformancePageCpuUsageHistoryFrame
TM_GRAPH_CONTROL PerformancePageMemUsageHistoryGraph
void PerformancePage_OnViewShowKernelTimes(void)
HWND hPerformancePageTotalsThreadCountEdit
HWND hPerformancePagePhysicalMemorySystemCacheEdit
INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
HWND hPerformancePageTotalsHandleCountEdit
HWND hPerformancePagePhysicalMemoryFrame
static void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
HWND hPerformancePageMemUsageFrame
void PerformancePage_OnViewCPUHistoryOneGraphPerCPU(void)
HWND hPerformancePageCpuUsageGraph
HWND hPerformancePageCpuUsageFrame
DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
HWND hPerformancePageKernelMemoryNonPagedEdit
HWND hPerformancePageCommitChargeFrame
HWND hPerformancePageTotalsProcessCountEdit
HWND hPerformancePageKernelMemoryTotalEdit
HWND hPerformancePageMemUsageGraph
static HANDLE hPerformanceThread
TM_GRAPH_CONTROL PerformancePageCpuUsageHistoryGraph
void PerformancePage_OnViewCPUHistoryOneGraphAll(void)
HWND hPerformancePageCommitChargePeakEdit
static int nPerformancePageWidth
HWND hPerformancePageMemUsageHistoryFrame
void RefreshPerformancePage(void)
HWND hPerformancePageCommitChargeLimitEdit
void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int pos)
static DWORD dwPerformanceThread
static void AdjustControlPosition(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
HWND hPerformancePagePhysicalMemoryAvailableEdit
HWND hPerformancePageTotalsFrame
HWND hPerformancePagePhysicalMemoryTotalEdit
HWND hPerformancePageKernelMemoryFrame
HWND hPerformancePageCommitChargeTotalEdit
HWND hPerformancePageKernelMemoryPagedEdit
_Out_opt_ int _Out_opt_ int * cy
BOOL CPUHistory_OneGraphPerCPU
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight)
TASKMANAGER_SETTINGS TaskManagerSettings
TW_UINT32 TW_UINT16 TW_UINT16 MSG
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
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 PostThreadMessage
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
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)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define SWP_NOOWNERZORDER
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI GetMenu(_In_ HWND)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)