Eliminate the main-window-DPI globals that bleed across dialogs on
secondary monitors. Window-aware code now passes its own DPI:
- Delete PhSystemDpi, PhSmallIconSize, PhLargeIconSize and
PhGuiSupportUpdateSystemMetrics; remove the mainwnd.c invocation
on WM_DPICHANGED.
- PhGetApplicationIcon and PhGetStockApplicationIcon now require a
WindowDpi parameter; PhGetApplicationIconEx is folded into
PhGetApplicationIcon. PhGetStockApplicationIcon keeps the shared
icon contract via a 4-slot DPI-keyed cache so multiple monitors
coexist without thrash.
- All ~50 callers updated to source DPI from their owning window
(PhGetWindowDpi for hwnd-bearing call sites; PhGetTaskbarDpi for
the tray icon; PhGetSystemDpi for window-class registration and
parentless task dialogs).
- PhSetApplicationWindowIcon now thin-wraps PhSetApplicationWindowIconEx
with PhGetWindowDpi(hwnd), so the 63 legacy call sites get
per-window-DPI icons without per-site edits.
- srvprv.c and mainwnd.c read PhProcessImageListWindowDpi instead
of PhSystemDpi/PhSmallIconSize.X for service and process icons.
Convert many build/*.cmd scripts to a consistent, modular style: enable delayed expansion, improve consistency and return proper exit codes. The CMake script (build_cmake.cmd) was significantly refactored to validate args, resolve toolchains, configure generator/build options, locate Visual Studio, and support generate/build/clean actions. build_compile_commands.cmd now publishes the logger and runs msbuild with a reusable RunMsBuild routine. Other scripts (build_clean, build_debug, build_devenv, build_dyndata, build_header, build_init, build_msix, build_release, build_sdk, etc.) were rewritten to use small functions, improved error handling, clearer comments, and CI-friendly behavior. Overall improvements: clearer flow control, better diagnostics, and safer interactive pauses.