Added October 2020
xcall MIAMEX, MX_GETDPI, sysdpi {,ctlid, ctldpi}
MIAMEX function MX_GETDPI (197) returns information about the effective or simulated resolution of the workstation monitor(s) in DPI (dots per inch). Applies only to A-Shell/Windows and ATE.
Parameters
sysdpi (Num) [out]
system DPI (primary monitor).
optional control ID (name or number) of control for which to return the control's DPI. This will only differ from sysdpi in a multi-monitor system where the control is on one of the secondary monitors.
ctldpi (Num) [out]
DPI of the monitor on which the control specified by ctlid is located.
Comments
If you don't specify the -dpm command line switch when launching A-Shell/Windows or ATE, the return value will probably be a value simulated by Windows (typically 96) rather than the real resolution of the monitor. The -dpm switch disables the Windows standard resolution simulation, giving access to the actual monitor resolution. See the documentation on the command line switch DPI Per Monitor Awareness for more details.
History
2020 October, A-Shell 6.5.1692: Function added to A-Shell.