At a minimum, for a Win32 application to work correctly with HiDPI it needs to tell the OS it is DPI aware.
This is done by marking the application DPI aware using the settings found in the manifest file.
The manifest file is then embedded into the resource section of the application, which then lets the OS know the application will be handling it's own DPI.
So the reason many of those 'legacy apps' don't work with HiDPI is they don't have those required manifest changes in place.
That then means the OS does the DPI scaling on behalf of the application and that results in poor scaling outcomes.