Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find zoom level
Message
From
28/11/2020 09:48:28
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
28/11/2020 09:41:09
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
01677297
Message ID:
01677309
Views:
42
>Hi!
>
>>What I do in my listener: (VFPA, VFP9 reports in scaled monitors are crap)
>
>I tried
>
>DECLARE INTEGER GetDpiForWindow IN user32.DLL LONG HWND
>DECLARE INTEGER GetDesktopWindow IN user32.DLL
>SET DECIMALS TO 5
>? GetDpiForWindow(_SCREEN.HWND),GetDpiForWindow(GetDesktopWindow())
>?GetDpiForWindow(_SCREEN.HWND)/GetDpiForWindow(GetDesktopWindow())
>
>
>output is 96 , 96 and scaling is 1. How to get expected value 1.25 as shown in windows ?
DECLARE INTEGER GetDpiForWindow IN user32.DLL LONG HWND
DECLARE INTEGER GetDesktopWindow IN user32.DLL
SET DECIMALS TO 5
*this is the factor all elements are smaller (this is a rectangle on an frx of length n  is n*the result smaller if scaled)
? GetDpiForWindow(_SCREEN.HWND),GetDpiForWindow(GetDesktopWindow())
*this is the scaling (the inverse of the above)
?GetDpiForWindow(GetDesktopWindow())/GetDpiForWindow(_SCREEN.HWND)
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform