ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView and per MonitorV2 awareness: scroll position does not hold
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

uko

Germany
31 Posts

Posted - Jan 22 2024 :  10:14:04  Show Profile  Reply
Hi,

ImageEN 13.0.0.0, Delphi 11.3

it looks like TImageEnMView is not fully aware of DPI changes as it looses it's scroll positions when moving application from 96 to 192 DPI screens and back.
- Please start with Demo Multi\Multiview (Build with PerMonitor Aware V2)
- load sample Multi_Icon.ico
- reduce height so that only two icons are visible
- scroll to last icon
- move application to a screen with 192 DPI and see how scrollbar position is changing
- again scroll down to last icon (see sample_192.png)
- move back on 96 DPI screen
- now position is reset to zero (see sample_96.png)

attach/uko/202412210121_sample_img.zip
136.33 KB


What is the right way to fix the position?


Thanks!

xequte

38046 Posts

Posted - Jan 22 2024 :  21:56:33  Show Profile  Reply
Sorry, I didn't get a chance to investigate this today. Does the same thing happen with standard VCL TWinControls like TListBox?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

uko

Germany
31 Posts

Posted - Jan 23 2024 :  01:55:56  Show Profile  Reply
Nigel,

some win controls hold their position, others not. From what I noted: I have not found any ChangeScale method on ImageEn which is the usual place to react on DPI changes. The main problem seems to be GetMaxViewXY which is called during DPI change (WM_SIZE message) which seems to work with wrong data (Clientsize?). Normally, if not explicitly recalculated I would have expected every stored position/size to be DPI scaled on ChangeScale.


kind regards,
Ulrich

Go to Top of Page

xequte

38046 Posts

Posted - Jan 23 2024 :  20:08:11  Show Profile  Reply
Hi Ulrich

We're working on a fix for this, but I the ChangeScale method is a bit hit and miss, which gives an inconsistent result with the scrollbar scaling :-/

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38046 Posts

Posted - Jan 23 2024 :  22:56:04  Show Profile  Reply
Hi Ulrich

You can email me for a solution which also improves performance when moving between screens of different DPIs.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: