Pages.ScreenX / Pages.ScreenY and Windows 10 1607

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
prosozial_schmitt
User
Posts: 49
Joined: Tue Dec 28, 2004 9:49 am

Pages.ScreenX / Pages.ScreenY and Windows 10 1607

Post by prosozial_schmitt »

Hello,

it seems, that after Windows 10 Update 1607 the values of Pages.ScreenX / Pages.ScreenY have changed on high textscaling-settings. (see screenshots in attachment)

I have set the text-scaling of my monitor to 200% (Microsoft Surface 4, high-dpi). So I have a scaling-factor of 2.
Before Windows 10 Update 1607, Pages.ScreenX / Pages.ScreenY values correspond to the screen-position of the control (all panes are hidden).

After Windows 10 Update 1607, Pages.ScreenX / Pages.ScreenY value don't correspond to the screen-position (tested again on a Surface 4, high-dpi, text-scaling 200%). They have doubled their value (seems to be position * scaling-factor, tested also with other scalings - same behaviour).

You can verify this with the code in the attachment. Copy it into the main-form of your sample-application and bind it to a button. After loading a pdf, just see the values on a pc with 200% textscaling with and without Update 1607.
I believe, that this behaviour affects also to the function TranslateScreenPoint.

All tested with PDF-Viewer 2.5.317.1.

What is going wrong? What can I change?
I don't want to code OS-dependend...

Greetings
Hans-Peter
Attachments
sample.zip
Sample-Code and screenshots
(630.79 KiB) Downloaded 128 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Pages.ScreenX / Pages.ScreenY and Windows 10 1607

Post by Tracker Supp-Stefan »

Hello Hans-Peter,

Thanks for your post. Sorry to bring you the bad news, but the Viewer SDK is no longer actively developed, and it's unlikely that we will implement changes in it that will handle Windows scaling. So you will probably need to detect if such scaling is used, and then adjust the received coordinate values accordingly. Or switch to our Editor SDK which is the current and actively developer SDK package.

Regards,
Stefan
Post Reply