mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 09:19:32 +02:00
patch from zaher dirkey, fixes cliprect under wince. see bug #17249
git-svn-id: trunk@27173 -
This commit is contained in:
parent
136fc6f86a
commit
8553012044
@ -1181,7 +1181,17 @@ end;}
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TWinCEWidgetSet.ExcludeClipRect(dc: hdc; Left, Top, Right, Bottom: Integer): Integer;
|
||||
var
|
||||
P: TPoint;
|
||||
begin
|
||||
// Fixes the following bug: http://bugs.freepascal.org/view.php?id=17249
|
||||
if LCLIntf.GetWindowOrgEx(DC, @P) > 0 then
|
||||
begin
|
||||
Left := Left + P.x;
|
||||
Top := Top + P.y;
|
||||
Right := Right + P.x;
|
||||
Bottom := Bottom + P.y;
|
||||
end;
|
||||
Result := Windows.ExcludeClipRect(dc, Left, Top, Right, Bottom);
|
||||
end;
|
||||
|
||||
@ -1432,8 +1442,13 @@ end;
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TWinCEWidgetSet.GetClipBox(DC : hDC; lpRect : PRect) : Longint;
|
||||
var
|
||||
P: TPoint;
|
||||
begin
|
||||
Result := Windows.GetClipBox(DC, Windows.LPRECT(lpRect));
|
||||
// Fixes the following bug: http://bugs.freepascal.org/view.php?id=17249
|
||||
if LCLIntf.GetWindowOrgEx(DC, @P) > 0 then
|
||||
OffsetRect(lpRect^, -P.x, -P.y);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user