WMDPIChanged reads incorrect value for NewDpi
Original Reporter info from Mantis: dmz73 @dmz73
-
Reporter name:
Original Reporter info from Mantis: dmz73 @dmz73
- Reporter name:
Description:
procedure TCustomForm.WMDPIChanged in lcl\include\customform.inc reads NewDpi using following code:
NewDpi := hi(Msg.wParam);
On 64bit windows wParam is 64bit and NewDpi becomes 0.
This results in window being shrunk to just title bar.
Steps to reproduce:
Create GUI application with 1 form and place a button and memo on the form.
Compile application for 64bit Windows and Win32 widgetset.
Run application on Windows 10 system with 2 monitors, each with different text scaling.
Drag application form from one monitor to the other one.
As application form is dragged to new monitor, it will shrink to just a title bar.
Additional information:
NewDpi should be read using something like this:
NewDpi := hi(Cardinal(Msg.wParam));
Mantis conversion info:
- Mantis ID: 35971
- OS: Windows
- OS Build: 10
- Platform: x86_64
- Version: 2.0.4
- Fixed in revision: 61706 (#3a1eff3f)
- Target version: 2.0.6