In WinCE there is problem after PaintControls in need to paint the TGraphicControl, Before send the paint, PaintControls move the window org (MoveWindowOrg) to make the TGraphicControl can draw started from 0,0 of it self.
But the problem the Canvas.ClipRect not moved in WinCE that make bug in complex controls used ClipRect.
Also we have the same problem when this control use ExcludeClipRect
the attached file is project have class using the both function and we can see the problem in WinCE compared with Win32, also if define CORRECT by remove the dot in the header if unit1.pas {.$DEFINE CORRECT} we can see how the problem solved.
The Idea to solve the problem by modify GetClipBox in WinCE widgetset
function TWinCEWidgetSet.GetClipBox(DC : hDC; lpRect : PRect) : Longint;
var
P: TPoint;
begin
Result := Windows.GetClipBox(DC, Windows.LPRECT(lpRect));
LCLIntf.GetWindowOrgEx(DC, @P);
OffsetRect(lpRect^, -P.x, -P.y);
end;
also for ExcludeClipRect, LDtoDP and DPtoLD.
But my ask, why that problem it is appear now, my controls worked in the past perfectly?.
Related bugs
http://bugs.freepascal.org/view.php?id=0014857http://bugs.freepascal.org/view.php?id=15654