Hello,
it is possible to define a scalefactor inside the windowdesktop defines.
Does a function exists that returns the selected value
Possible values are 100 ( normal ), 125 and 150 %
The problem GETCURSORPOS() works only with selecting 100 % scalefactor
other selections must be adjusted with a defined factor :
local hDeskTop := GETDC(0)
local a := GETCURSORPOS()
// Left Top
local nColor := GETPIXEL( hDeskTop, a[2] * nMonScale, a[1] * nMonScale )
regards
Uwe
Return-value of the selected Windows-scalefactor ?
Return-value of the selected Windows-scalefactor ?
Last edited by ukoenig on Tue Jan 26, 2021 10:47 am, edited 3 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Return-value of the selected Windows-scalefactor ?
Dear Uwe,
https://stackoverflow.com/questions/325 ... ws-scaling
This seems to be what you are looking for:
https://stackoverflow.com/questions/325 ... ws-scaling
This seems to be what you are looking for:
Code: Select all
#include "FiveWin.ch"
#define VERTRES 10
#define DESKTOPVERTRES 117
function Main()
local hDC := GetDC( GetDesktopWindow() )
local nLogicalScreenHeight := GetDeviceCaps( hDC, VERTRES )
local nPhysicalScreenHeight := GetDeviceCaps( hDC, DESKTOPVERTRES )
local nScreenScalingFactor := nPhysicalScreenHeight / nLogicalScreenHeight
MsgInfo( nScreenScalingFactor ) // 1.00 is 100%, 1.25 is 125%, etc
ReleaseDC( GetDesktopWindow(), hDC )
return nil
Re: Return-value of the selected Windows-scalefactor ?
Dear Antonio,
thank You very much
Your solution works perfect and is tested with the colorpicker
the scalefactor is autodetected now
best regards
Uwe
thank You very much
Your solution works perfect and is tested with the colorpicker
the scalefactor is autodetected now
best regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.