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;
272 nXDifference +=
lastX;
273 nYDifference +=
lastY;
275 if (nXDifference % 2) {
276 if (nXDifference > 0) {
284 if (nYDifference % 2) {
285 if (nYDifference > 0) {
322 ULONG CpuKernelUsage;
334 ULONG TotalProcesses;
339 WCHAR szMemUsage[256], szCpuUsage[256], szProcesses[256];
350 WCHAR szChargeTotalFormat[256];
351 WCHAR szChargeLimitFormat[256];
382 wsprintfW(
Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat,
383 (CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0));
441 if (CpuUsage <= 0 ) CpuUsage = 0;
442 if (CpuUsage > 100) CpuUsage = 100;
453 if (CpuKernelUsage <= 0) CpuKernelUsage = 0;
454 if (CpuKernelUsage > 100) CpuKernelUsage = 100;
465 nBarsUsed1 = CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0;
469 nBarsUsed2 = PhysicalMemoryTotal ? ((PhysicalMemoryAvailable * 100) / PhysicalMemoryTotal) : 0;
508 HMENU hCPUHistoryMenu;
522 HMENU hCPUHistoryMenu;
ULONG PerfDataGetPhysicalMemorySystemCacheK(void)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
static HANDLE hPerformanceThread
INT_PTR CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
void GraphCtrl_SetBackgroundColor(TGraphCtrl *this, COLORREF color)
#define IDC_PHYSICAL_MEMORY_TOTAL
HWND hPerformancePageCpuUsageHistoryFrame
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
#define IDS_STATUS_PROCESSES
ULONG PerfDataGetKernelMemoryNonPagedK(void)
_CRTIMP wchar_t *__cdecl _ultow(_In_ unsigned long _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
TGraphCtrl PerformancePageMemUsageHistoryGraph
#define IDC_PHYSICAL_MEMORY_SYSTEM_CACHE
HWND hPerformancePageTotalsHandleCountEdit
HWND hPerformancePageKernelMemoryPagedEdit
#define IDS_TOTALS_PROCESS_COUNT
HWND hPerformancePageMemUsageGraph
#define IDC_MEM_USAGE_FRAME
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define IDC_CPU_USAGE_FRAME
#define IDC_KERNEL_MEMORY_NONPAGED
void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight)
#define IDC_COMMIT_CHARGE_TOTAL
HDC WINAPI GetDC(_In_opt_ HWND)
static DWORD dwPerformanceThread
HWND hPerformancePageCommitChargeFrame
HWND hPerformancePageMemUsageHistoryGraph
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
HWND hPerformancePageMemUsageHistoryFrame
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
HWND hPerformancePageCommitChargePeakEdit
ULONG PerfDataGetCommitChargePeakK(void)
void PerformancePage_OnViewCPUHistoryOneGraphPerCPU(void)
#define IDC_COMMIT_CHARGE_PEAK
HWND hPerformancePageKernelMemoryNonPagedEdit
#define IDC_PHYSICAL_MEMORY_FRAME
ULONG PerfDataGetCommitChargeLimitK(void)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
ULONG PerfDataGetTotalThreadCount(void)
static int nPerformancePageWidth
#define IDC_MEMORY_USAGE_HISTORY_FRAME
ULONG PerfDataGetProcessorSystemUsage(void)
#define IDC_KERNEL_MEMORY_PAGED
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
TGraphCtrl PerformancePageCpuUsageHistoryGraph
#define IDS_PHYSICAL_MEMORY_TOTAL
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
void GraphCtrl_Dispose(TGraphCtrl *this)
DWORD WINAPI GetSysColor(_In_ int)
ULONG PerfDataGetSystemHandleCount(void)
#define IDC_PHYSICAL_MEMORY_AVAILABLE
#define IDS_PHYSICAL_MEMORY_AVAILABLE
ULONG PerfDataGetPhysicalMemoryAvailableK(void)
#define IDC_COMMIT_CHARGE_LIMIT
static void AdjustControlPosition(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
#define ID_VIEW_CPUHISTORY_ONEGRAPHALL
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define IDS_COMMIT_CHARGE_LIMIT
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
ULONG PerfDataGetKernelMemoryPagedK(void)
_Out_opt_ int _Out_opt_ int * cy
#define ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU
static void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
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)
#define IDC_COMMIT_CHARGE_FRAME
#define IDC_CPU_USAGE_HISTORY_FRAME
HWND hPerformancePagePhysicalMemorySystemCacheEdit
HWND hPerformancePagePhysicalMemoryFrame
ULONG PerfDataGetProcessCount(void)
WNDPROC OldGraphCtrlWndProc
void GraphCtrl_Create(TGraphCtrl *this, HWND hWnd, HWND hParentWnd, UINT nID)
#define IDS_COMMIT_CHARGE_PEAK
void GraphCtrl_SetRange(TGraphCtrl *this, double dLower, double dUpper, int nDecimalPlaces)
static int nPerformancePageHeight
HWND hPerformancePageCommitChargeLimitEdit
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int pos)
HWND hPerformancePageKernelMemoryFrame
void GraphCtrl_SetPlotColor(TGraphCtrl *this, int plot, COLORREF color)
void RefreshPerformancePage(void)
HWND hPerformancePageKernelMemoryTotalEdit
#define PostThreadMessage
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define ID_VIEW_SHOWKERNELTIMES
#define IDS_STATUS_CPUUSAGE
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define IDS_PHYSICAL_MEMORY_SYSTEM_CACHE
HWND hPerformancePageTotalsThreadCountEdit
#define IDS_STATUS_MEMUSAGE
HWND hPerformancePageCpuUsageFrame
#define IDS_KERNEL_MEMORY_NONPAGED
void GraphCtrl_SetGridColor(TGraphCtrl *this, COLORREF color)
#define IDC_TOTALS_PROCESS_COUNT
double GraphCtrl_AppendPoint(TGraphCtrl *this, double dNewPoint0, double dNewPoint1, double dNewPoint2, double dNewPoint3)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
void PerformancePage_OnViewShowKernelTimes(void)
#define IDC_KERNEL_MEMORY_FRAME
#define IDS_TOTALS_THREAD_COUNT
INT_PTR CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
HWND hPerformancePageCpuUsageGraph
#define IDC_TOTALS_HANDLE_COUNT
void PerformancePage_OnViewCPUHistoryOneGraphAll(void)
#define IDC_CPU_USAGE_HISTORY_GRAPH
ULONG PerfDataGetKernelMemoryTotalK(void)
HWND hPerformancePageCommitChargeTotalEdit
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
HWND hPerformancePageCpuUsageHistoryGraph
HWND hPerformancePageTotalsProcessCountEdit
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND hPerformancePagePhysicalMemoryTotalEdit
#define IDC_TOTALS_THREAD_COUNT
#define IDC_CPU_USAGE_GRAPH
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND hPerformancePageMemUsageFrame
ULONG PerfDataGetCommitChargeTotalK(void)
ULONG PerfDataGetPhysicalMemoryTotalK(void)
HWND hPerformancePageTotalsFrame
#define IDC_MEM_USAGE_GRAPH
#define IDS_COMMIT_CHARGE_TOTAL
#define IDC_MEM_USAGE_HISTORY_GRAPH
ULONG PerfDataGetProcessorUsage(void)
TASKMANAGER_SETTINGS TaskManagerSettings
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
HWND hPerformancePagePhysicalMemoryAvailableEdit
DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
HMENU WINAPI GetMenu(_In_ HWND)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
BOOL CPUHistory_OneGraphPerCPU
#define IDC_KERNEL_MEMORY_TOTAL
#define IDS_KERNEL_MEMORY_PAGED
#define IDS_KERNEL_MEMORY_TOTAL
#define SWP_NOOWNERZORDER
#define IDS_TOTALS_HANDLE_COUNT