CustomDrawn: Improve function GetMonitorInfo(). Issue #36574, patch from Yuriy Sydorov.

git-svn-id: trunk@62600 -
This commit is contained in:
juha 2020-01-31 09:53:07 +00:00
parent beaf08063c
commit 519db75d62

View File

@ -2903,7 +2903,7 @@ end;
*)
function TCDWidgetSet.GetMonitorInfo(Monitor: HMONITOR; lpmi: PMonitorInfo): Boolean;
begin
Result := (lpmi <> nil) and (lpmi^.cbSize >= SizeOf(TMonitorInfo)) or (Monitor <> 1);
Result := (lpmi <> nil) and (lpmi^.cbSize >= SizeOf(TMonitorInfo)) and (Monitor = 1);
if not Result then Exit;
lpmi^.rcMonitor:=Types.Rect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
lpmi^.rcWork:=lpmi^.rcMonitor;