on win7, there is a slider in the Control Panel for "smaller 100%", "medium 125%", and "larger 150%"
on XP, the only way you could change the DPI was in the Display control panel -> Advanced
there are a couple of different ways to get the DPI, and i'm not sure which one is the best, but i have been using the last one:
RegRead, AppliedDPI, HKEY_CURRENT_USER, Control Panel\Desktop\WindowMetrics, AppliedDPI
RegRead, LogPixels, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI, LogPixels
msgbox, % DllCall("GetDeviceCaps", "uint", DllCall("GetDC", "uint", 0), "uint", LOGPIXELSX := 0x58)
msgbox, % DllCall("GetDeviceCaps", "uint", DllCall("GetDC", "uint", 0), "uint", LOGPIXELSY := 0x5A)
microsoft used the last ones in their example here as well:
since i always use 120 DPI (125% scaling), i don't even worry about any of this. because any GUIs that i design are obviously gonna fit for 120 DPI, and then if someone is using 96 DPI (100% scaling), then they will still be able to read everything, my GUI will just be larger and more spacious than necessary.
but i would run into problems if someone was using 150%, but i havent had a complaint yet