OK, I've confirmed the problem is to do with DPI
Virtualisation, which requires Aero (also known as the DWM=Desktop Window Manager).
Quote:
Windows Vista introduces a feature called DPI virtualization which provides some level of automatic scaling support to applications which are not DPI aware. Without this feature, the size of the text and UI elements of DPI unaware applications would typically be smaller on high DPI settings compared to rest of the system, potentially causing usability and readability problems.
This feature works
by providing “virtualized” system metrics and UI elements to the application, as if it were running at 96 DPI. The application then
renders to a 96-DPI off-screen surface and the Desktop Windows Manager then scales the resulting application window to match the DPI setting. For example, if the DPI display setting is 144, DWM scales the application’s window by 150%, or 144/96. The type of scaling that DPI virtualization uses is based on pixel stretching. As a result, blurring occurs due to the stretched pixels. The following screenshot shows the type of visual artifact caused by stretched pixels due to DPI virtualization.
Source: http://go.microsoft.com/fwlink/?LinkID=129586
On Windows 7 64-bit with DWM and 150% DPI, I see an interesting problem:
some applications work correctly with WindowPad, and some do not.
For instance, Explorer and Calc, which appear to be DPI-aware, end up squashed into a scaled down portion of the screen, whereas Foxit Reader, SpeedCrunch and Reshacker, which do not appear to be DPI-aware, work correctly. This makes sense: AutoHotkey gets the virtualised system metrics (monitor co-ords), then applies them to other applications where they are correct only if the application is not DPI-aware.
However, when I tested with 200%, some applications (including SpeedCrunch) were positioned off-screen and in inconsistent sizes/positions. I couldn't figure it out; maybe Windows got confused and needed a reboot (though I still haven't rebooted).
The solution might be to scale by the DPI setting for applications which are DPI-aware, but I need to know how to determine DPI-awareness.
Btw, VirtualBox does not look nice at 150% DPI... (it has rendering issues within its UI, and also scales the VM).
Edit: I've been getting very inconsistent results while testing.
For instance,
- Though not ideal, I expect DPI-unaware applications to be positioned according to a rectangle like {0,0,A_ScreenWidth*dpi/96,A_ScreenHeight*dpi/96}; in other words, from the top-left of the screen to the bottom-right according to the "effective resolution" (which is lower with higher DPI settings). Sometimes it works this way, and sometimes they are instead positioned according to something more like {200,200,A_ScreenWidth,A_ScreenHeight}, which makes absolutely no sense.
- MouseGetPos will inconsistently fail to detect the appropriate window (for the OutputVarWin arg).
- My Mouse Gestures script was intermittently (i.e. at very close intervals) retrieving mouse co-ords in either DPI-scaled or DPI-unscaled co-ords (or perhaps scaled**2 vs scaled).
- Worst of all, I can change DPI settings to and fro, and any of the above behaviour (with the same DPI settings) will change.
In Windows 7, if you choose "Set custom text size (DPI)", there is an option for "Use Windows XP style DPI scaling". I believe enabling this option disables DPI Virtualisation. I suggest you try this, and see how it affects the script and your applications. On my system it seems to fix the script and typically improve rendering in in various applications.