About the method of "SaveChartToFile" and "Lo
Posted: Thu Nov 20, 2008 8:10 am
The following codes don't work well.
I used "LoadChartFromFile()" to load chart settings,and then
add some sample points to chart .But the "Access violation ,read address of 00000000" was showed .
BTW: I used TeeChart6.01,BCB6.0
I used "LoadChartFromFile()" to load chart settings,and then
add some sample points to chart .But the "Access violation ,read address of 00000000" was showed .
BTW: I used TeeChart6.01,BCB6.0
Code: Select all
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "TeeStore.hpp"
#include "EditChar.hpp"
#include "TeeEditPRO.hpp"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//Load Tchart Parameters
void __fastcall TForm1::btnSaveparaClick(TObject *Sender)
{
SaveChartToFile(Chart1,"d:\\a.tee",false,false);
}
//Edit chart
void __fastcall TForm1::btnEditchartClick(TObject *Sender)
{
EditChart(Form1,Chart1);
}
//Add sample points
void __fastcall TForm1::btnAddPointClick(TObject *Sender)
{
Series1->FillSampleValues(100) ;
Series2->FillSampleValues(100) ;
}
//Load chart Parameters
void __fastcall TForm1::btnLoadParaClick(TObject *Sender)
{
if(FileExists("d:\\a.tee"))
LoadChartFromFile(Chart1,"d:\\a.tee");
}