65 cy += nYDifference / 2;
71 cy += nYDifference / 2;
75 sy = rc.
bottom - rc.
top + nYDifference / 2;
78 cx = rc.
left + nXDifference;
79 cy = rc.
top + nYDifference;
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;
170 fmt.clrPlot0 =
RGB(255, 255, 0);
171 fmt.clrPlot1 =
RGB(100, 255, 255);
245 nXDifference +=
lastX;
246 nYDifference +=
lastY;
248 if (nXDifference % 2)
250 if (nXDifference > 0)
261 if (nYDifference % 2)
263 if (nYDifference > 0)
304 ULONG CpuKernelUsage;
316 ULONG TotalProcesses;
321 WCHAR szMemUsage[256], szCpuUsage[256], szProcesses[256];
334 WCHAR szChargeTotalFormat[256];
335 WCHAR szChargeLimitFormat[256];
366 wsprintfW(
Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat,
367 (CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0));
438 nBarsUsed1 = CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0;
442 nBarsUsed2 = PhysicalMemoryTotal ? ((PhysicalMemoryAvailable * 100) / PhysicalMemoryTotal) : 0;
483 HMENU hCPUHistoryMenu;
497 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)
static HWND hPhysicalMemoryTotalEdit
static HWND hCommitChargeLimitEdit
static HWND hTotalsThreadCountEdit
HWND hPerformancePageMemUsageHistoryGraph
static HWND hKernelMemoryPagedEdit
static int nPerformancePageHeight
HWND hPerformancePageCpuUsageHistoryGraph
TM_GRAPH_CONTROL PerformancePageMemUsageHistoryGraph
void PerformancePage_OnViewShowKernelTimes(void)
static HWND hCpuUsageHistoryFrame
DWORD WINAPI PerformancePageRefreshThread(PVOID Parameter)
INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
static HWND hMemUsageGraph
static HWND hMemUsageHistoryFrame
static void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
static HWND hCommitChargePeakEdit
static HWND hPhysicalMemoryAvailableEdit
static HWND hTotalsHandleCountEdit
void PerformancePage_OnViewCPUHistoryOneGraphPerCPU(void)
static HWND hCommitChargeTotalEdit
static HWND hCpuUsageGraph
static HWND hKernelMemoryTotalEdit
static HWND hPhysicalMemoryFrame
static HANDLE hPerformanceThread
TM_GRAPH_CONTROL PerformancePageCpuUsageHistoryGraph
static HWND hKernelMemoryNonPagedEdit
void PerformancePage_OnViewCPUHistoryOneGraphAll(void)
static int nPerformancePageWidth
void RefreshPerformancePage(void)
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)
static HWND hCpuUsageFrame
static HWND hCommitChargeFrame
static HWND hMemUsageFrame
static HWND hKernelMemoryFrame
static HWND hTotalsProcessCountEdit
static HWND hPhysicalMemorySystemCacheEdit
_Out_opt_ int _Out_opt_ int * cy
BOOL CPUHistory_OneGraphPerCPU
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
TASKMANAGER_SETTINGS TaskManagerSettings
TW_UINT32 TW_UINT16 TW_UINT16 MSG
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 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)
#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)