patch from zaher dirkey, fixes cliprect under wince. see bug #17249

git-svn-id: trunk@27173 -
This commit is contained in:
sekelsenmat 2010-08-23 19:01:21 +00:00
parent 136fc6f86a
commit 8553012044

View File

@ -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;
{------------------------------------------------------------------------------