reactos/base
Hermès Bélusca-Maïto 129f10ea26 [TASKMGR] Cherry pick Hermes fixes
** WIP ** [TASKMGR] Get rid of thread-oriented updates. Just do it synchronously on WM_TIMER.

** WIP ** Merge RefreshPerformancePage() and PerformancePageRefreshThread(), now that we removed the separate performance page refreshing thread.

- Use _ui64tow() instead of _ultow() for converting ULONGLONGs into
  a string representation.

- Isolate the update of the status bar.

- Isolate the actual graphs redrawing. The idea for later is to not
  trigger any redrawings (and run unnecessary code) if the page is deactivated.

[TASKMGR] No need to get and save global handles for all the controls in the performance page.

... and especially for controls that are used only in one place.
Only handles to the graph controls are sufficient. For the others,
we can manage by using dialog control IDs.

- Rename AdjustFrameSize() 'pos' parameter to be more explicit.

** WIP ** Group trios of Memory performance getters together, as they are always used in succession.

- Group PerfDataGetCommitCharge[Total|Limit|Peak]K() together into
  PerfDataGetCommitChargeK().

- Group PerfDataGetKernelMemory[Total|Paged|NonPaged]K() together
  into PerfDataGetKernelMemoryK().

- Group PerfDataGetPhysicalMemory[Total|Available|SystemCache]K()
  together into PerfDataGetPhysicalMemoryK().

- Use these new Mem performance getters.

[TASKMGR] Use owner-drawn performance graphs.

- Use owner-drawn buttons to implement correct graph painting while
  maintaining the 3D appearance. As done on Windows (TM)

  Why using buttons (that should be disabled btw.)?
  Because we want, if the graphs fail to be created (due to e.g.
  lack of resources), to show a descriptive label of what's missing.

  This also allow the graphs to be drawn **properly** inside a 3D-border window.

- Redraw graphs on WM_DRAWITEM.

- Don't need to subclass button controls.

- Use DeferWindowPos() to avoid controls blinking on resize.

- Fix the problem of the buttons resizing as "1/x": this was due to
  the fact, using GetClientRect + Mapping, did't take the border into
  account. Instead, use GetWindowRect + a different coord mapping to
  fix all that.

- Remove some dead code.

- Rename the remaining ridiculously long variable names.

** WIP ** CPU/Mem meters: keep a separate copy of the CPU/Mem perf values.

+ Use structure for keeping state.

** WIP ** Add support for multiple-CPU stats. (In progress, needs code cleanup.)

In particular, use SystemProcessorTimeInfo to calculate the idle time
as done in ROSAPPS' ctm.exe, see commit c0873723.

See also https://ladydebug.com/blog/codes/cpuusage_win.htm

+ Fix the problem of NtQuerySystemInformation(SystemPerformanceInformation)
  that shows up when running a 32-bit build under Windows 7 x64.

** WIP ** Investigating showing physical memory in the MEM gauge.
2025-02-01 16:36:33 +02:00
..
applications [TASKMGR] Cherry pick Hermes fixes 2025-02-01 16:36:33 +02:00
services [REACTOS] Refresh old URLs (#7632) 2025-01-28 13:36:45 +09:00
setup [REACTOS] Refresh old URLs (#7632) 2025-01-28 13:36:45 +09:00
shell [REACTOS] Refresh old URLs (#7632) 2025-01-28 13:36:45 +09:00
system [REACTOS] Refresh old URLs (#7632) 2025-01-28 13:36:45 +09:00
CMakeLists.txt