GetDpiForWindow is a function introduced in Windows 10, version 1607 (src).
Officially, Windows 7 is no longer supported since 3.6.0:
You will need Windows 10.