How To implement InvalidateRect
Posted: Fri Jan 28, 2005 1:48 am
I have a strange problem. (Delphi 7)
I have an mdichild with a single form on it. The form contains a tchart with align=alClient.
I am doing some drawing on the tchart in the onAfterDraw event. If I do chart.invalidate, the drawing works perfectly.
However, if I do this
var
tst:tRect
begin
tst:=chart1.boundsRect;
invalidaterect(chart1.handle,@tst,false)
end;
nothing happens. invalidateRect is a windows API command that allows you to invalidate only certain portions of a window. Since I chose the whole boundsRect, it should repaint the whole window. but it doesn't.
Of course, eventually, I only want to repaint small parts of the window, but can you tell me how to properly use invalidateRect with Tchart.
I have an mdichild with a single form on it. The form contains a tchart with align=alClient.
I am doing some drawing on the tchart in the onAfterDraw event. If I do chart.invalidate, the drawing works perfectly.
However, if I do this
var
tst:tRect
begin
tst:=chart1.boundsRect;
invalidaterect(chart1.handle,@tst,false)
end;
nothing happens. invalidateRect is a windows API command that allows you to invalidate only certain portions of a window. Since I chose the whole boundsRect, it should repaint the whole window. but it doesn't.
Of course, eventually, I only want to repaint small parts of the window, but can you tell me how to properly use invalidateRect with Tchart.