lcl: less with-blocks for FPC 3.1.1

git-svn-id: trunk@50297 -
This commit is contained in:
mattias 2015-11-11 13:39:48 +00:00
parent 71b53aa5ae
commit a0ffb9965a

View File

@ -2356,11 +2356,9 @@ begin
Result := customdrawn_winproc.GetWindowInfo(Handle, @Info); Result := customdrawn_winproc.GetWindowInfo(Handle, @Info);
if Result then if Result then
begin begin
with Info.rcWindow do R:=Info.rcWindow;
begin Width := R.Right - R.Left;
Width := Right - Left; Height := R.Bottom - R.Top;
Height := Bottom - Top;
end;
Width := Width - 2 * Integer(Info.cxWindowBorders); Width := Width - 2 * Integer(Info.cxWindowBorders);
Height := Height - 2 * Integer(Info.cyWindowBorders); Height := Height - 2 * Integer(Info.cyWindowBorders);
ExcludeCaption; ExcludeCaption;
@ -2368,17 +2366,13 @@ begin
Exit; Exit;
end; end;
Result := Boolean(Windows.GetWindowRect(lHandle, @R)); Result := Boolean(Windows.GetWindowRect(lHandle, @R));
with R do Width := R.Right - R.Left;
begin Height := R.Bottom - R.Top;
Width := Right - Left;
Height := Bottom - Top;
end;
end end
else else begin
with WP.rcNormalPosition do R:=WP.rcNormalPosition;
begin Width := R.Right - R.Left;
Width := Right - Left; Height := R.Bottom - R.Top;
Height := Bottom - Top;
end; end;
// convert top level lcl window coordinaties to win32 coord // convert top level lcl window coordinaties to win32 coord