Hello All,
I haven't programming in Delphi for about 3 years. I want to recompile source code from Delphi 3 to 4. It seems that I cannot easily compile my source code.
In old code, I have a TMChart, which is the decedant of the TChart, and I added a procedure to draw a marker on the Chart Canvas, the source code is as follow:
Procedure TMChart.DrawMarker(X,Y:Longint; ACanvas:TCanvas);
begin
with ACanvas do
begin
Pen.Mode:= pmXor;
Pen.Color:= FLeftMarkerColor;
Pen.Style:= psSolid;
Pen.Width:=1;
MoveTo(X,ChartRect.Top-Height3D);
LineTo(X,ChartRect.Bottom-Height3D);
RoundRect(X-5, Y-4, X+5, Y+5, X-4, Y-5);
end;
end;
The error message is this:
[Error] MChart.pas(309): Incompatible types: 'TCanvas' and 'TCanvas3D'
I need your help, thanks in advance.
shengli
I haven't programming in Delphi for about 3 years. I want to recompile source code from Delphi 3 to 4. It seems that I cannot easily compile my source code.
In old code, I have a TMChart, which is the decedant of the TChart, and I added a procedure to draw a marker on the Chart Canvas, the source code is as follow:
Procedure TMChart.DrawMarker(X,Y:Longint; ACanvas:TCanvas);
begin
with ACanvas do
begin
Pen.Mode:= pmXor;
Pen.Color:= FLeftMarkerColor;
Pen.Style:= psSolid;
Pen.Width:=1;
MoveTo(X,ChartRect.Top-Height3D);
LineTo(X,ChartRect.Bottom-Height3D);
RoundRect(X-5, Y-4, X+5, Y+5, X-4, Y-5);
end;
end;
The error message is this:
[Error] MChart.pas(309): Incompatible types: 'TCanvas' and 'TCanvas3D'
I need your help, thanks in advance.
shengli