大きいフォントサイズを選択しているときに GUI のアイテムの配置がずれてしまうときには、以下の関数によりフォントサイズを取得してアイテムを適切に配置すればよい。以下の関数は、How to detect Normal or Large font size settings (DPI)のスレッドで公開されたスクリプトを参考にした。このスレッドを立てたjordisさんは、フォントサイズをレジストリから読み取っている。それに対して、Joy2DWorldさんのスクリプトの方は、DllCall を使用している。関数の処理を見れば分かるように、私は後者のスクリプトを参考にした。
;;; How to detect Normal or Large font size settings (DPI) ;;; http://www.autohotkey.com/forum/post-198727.html&sid=5f964c930528a1331705e692e5bcf639#198727 ;;; Posted: Mon May 26, 2008 6:31 pm msgbox,% getDPI() getDPI() { hDC := DllCall("GetDC") dpi := DllCall("GetDeviceCaps", UInt, hDC , UInt, 88) DllCall("ReleaseDC",Int, 0, UInt, hDC) return dpi ? dpi : 0 }