On Windows 10, the system no longer requires restart (logoff/logon) to change DPI (text size).
My application is not ready for such a runtime change.
How doe
As @TLama and @DalijaPrasnikar commented, the message to handle is WM_DPICHANGED.
#define WM_DPICHANGED 0x02E0
The message is available since Windows 8.1, where it is sent to a window when the window is moved to another monitor with a different DPI.
On Windows 10, the runtime change of DPI is, from an API point of view, identical to moving window to a different monitor with different DPI (except of course that in this case the window stays on the same monitor).
To even receive the message (even for runtime DPI change on Windows 10), the application needs to declare support for per-monitor DPI. The preferred way is to declare the support in an application manifest by setting dpiAwareness to PerMonitorV2 (and additional PerMonitor value and set dpiAware to True/PM for backward compatibility with older Windows 10 builds and Windows 8.1):
...
True/PM
PerMonitorV2,PerMonitor
When the application declares per-monitor DPI support, the system won't scale its windows pixel-wise on DPI runtime change. It's then up to the application to scale its windows natively.