Aug 6, 2010 at 12:53pm UTC
Hello, I'm from Brazil.
I have to create a class in C + +.
I already have the code ready in Delphi, how can I convert the code into C + +?
--------Code in Delphi, like turning in C + +?----------------------
TChartCell = class(TInterfacedPersistent, ICellGraphic)
private
FChart: TAdvGDIPChart;
procedure SetChart(const Value: TAdvGDIPChart);
public
{ Interface }
procedure Draw(Canvas: TCanvas;R: TRect; Col,Row: integer; Selected: boolean; Grid: TAdvStringGrid);
function CellWidth: integer;
function CellHeight: integer;
function IsBackground: boolean;
constructor Create;
destructor Destroy; override;
property Chart: TAdvGDIPChart read FChart write SetChart;
end;
---------------------------------//----------------------------------------
Anything my email is: rodolfo_marinilima@hotmail.com
Aug 6, 2010 at 1:13pm UTC
I'm Tryna thus more this completely wrong
class TExemplo_74 : public TForm
{
__published: // IDE-managed Components
TAdvStringGrid *AdvStringGrid1;
TButton *Button1;
class TchartCell
{
private: // User declarations
TAdvGDIPChart *FChart;
void __fastcall SetChart(const Value: TAdvGDIPChart);
public: // User declarations
__fastcall TExemplo_74(TComponent* Owner);
TInterface ICellGraphic;
void __fastcall Draw(TCanvas *Canvas , TRect &R, int ARow, int ACol, bool &Selected, TAdvStringGrid *Grid);
int CellWidth();
int CellHeight();
bool IsBackground();
constructor Create;
destructor Destroy; override;
property Chart: TAdvGDIPChart read FChart write SetChart;
};
};
Aug 7, 2010 at 3:11pm UTC
High!
No, the code does not convert within Delphi IDE nor any other Borland one. Instead of the direct code translation there is for your convenience the linker option to generate C++ .obj
file for the compiling into an executable with a C++ compiler.
The .obj file may not be compatible with other compilers than
Borland ones.