Lexikos/AutoHotkey_L — pull request #24 by fincs (2013-06-09 12:23:38+00:00)
Title: DPI Awareness and GUI scaling

As per the PM I sent you a few days ago, I've implemented DPI awareness into AutoHotkey (however it is no longer a crude PoC as I stated before). This has the following implications:

- AutoHotkey now states DPI awareness in its manifest, so DPI virtualization is turned off. This results in windows that are not blurry and accurate pixel/position information.
- An `A_ScreenDPI` BIV was added. Turns out it cannot be retrieved using `SysGet`.
- **GUIs can be automatically scaled** so that they look the same as in the default Windows DPI setting (96 DPI, "100%"):
- This behaviour can be controlled using `+/-DPIScale` (on by default, so that existing scripts can continue to work with mostly no issues)
- Several GUI layout constants AutoHotkey uses are always scaled, because they have to
- Control positions and sizes (`xN yN wN hN` and relative positioning) are scaled in proportion to the DPI. This affects `Gui,Add`; `Gui,Margin`; `GuiControl,Move(Draw)` and `+MinSize/MaxSize`
- `Gui,Show` width and height are also scaled (*not* X or Y)
- ListView column and StatusBar part widths are also scaled
- `GuiControlGet,Pos` performs the reverse DPI conversion ("unscaled coordinates").
- `A_GuiWidth`, `A_GuiHeight`, `A_GuiX` and `A_GuiY` also return unscaled coordinates
- `InputBox` and `Progress` also get DPI scaling treatment (not `SplashImage` because of obvious reasons). I chose not to allow disabling DPI scaling for these commands because of rarity.