View Issue Details

IDProjectCategoryView StatusLast Update
0035971LazarusLCLpublic2019-08-20 01:15
Reporterdmz73Assigned Towp 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSWindowsOS Version10
Product Version2.0.4Product Build 
Target VersionFixed in Version 
Summary0035971: WMDPIChanged reads incorrect value for NewDpi
Descriptionprocedure 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 ReproduceCreate 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 InformationNewDpi should be read using something like this:
NewDpi := hi(Cardinal(Msg.wParam));
TagsNo tags attached.
Fixed in Revision61706
LazTarget2.0.6
WidgetsetWin32/Win64
Attached Files

Activities

dmz73

2019-08-16 08:42

reporter   ~0117695

I forgot to mention in steps to reproduce: open Project Options -> Application and set DPI awareness to "per monitor/V2 (True/PM)"

wp

2019-08-16 16:25

developer   ~0117705

Applied, thank you. Please test and close if ok.

dmz73

2019-08-20 01:15

reporter   ~0117741

Tested the latest trunk version and now NewDPI is correctly calculated.

Issue History

Date Modified Username Field Change
2019-08-16 08:35 dmz73 New Issue
2019-08-16 08:42 dmz73 Note Added: 0117695
2019-08-16 09:08 dmz73 Issue cloned: 0035972
2019-08-16 16:19 wp Assigned To => wp
2019-08-16 16:19 wp Status new => assigned
2019-08-16 16:25 wp Status assigned => resolved
2019-08-16 16:25 wp Resolution open => fixed
2019-08-16 16:25 wp Fixed in Revision => 61706
2019-08-16 16:25 wp LazTarget => 2.0.6
2019-08-16 16:25 wp Widgetset Win32/Win64 => Win32/Win64
2019-08-16 16:25 wp Note Added: 0117705
2019-08-20 01:15 dmz73 Note Added: 0117741
2019-08-20 01:15 dmz73 Status resolved => closed