Solved

if i use the c++ builder and want to save yo gif file!

Posted on 2000-03-29
3
397 Views
Last Modified: 2010-04-10
my source code is:
void __fastcall TForm1::FormCreate(TObject *Sender)
{





 while(!Query1->Eof)
  {
      char szName[255];
      // get data from first table
      // and save data into csc
      String csc = Query1->FindField("STKCODE")->AsString;

      // into csc to second table and get data

      Query2->Close();

      Query2->SQL->Clear();
      Query2->SQL->Add("select stkcode,syear*100+smon,sb_vol,lb_vol,cp");
      Query2->SQL->Add("from ap.amgin");
      Query2->SQL->Add("where STKCODE =:sss");
      Query2->SQL->Add("and syear*100+smon >199702");
      Query2->ParamByName("sss")->AsString= csc;
      Query2->Active=TRUE;

     // use the data of second table to draw the line chart
      Series1->DataSource=Query2;
      Series1->ParentChart=DBChart1;
      Series1->XLabelsSource="syear*100+smon";
      Series1->YValues->ValueSource= "lb_vol";
      Series2->DataSource=Query2;
      Series2->ParentChart=DBChart1;
      Series2->XLabelsSource="syear*100+smon";
      Series2->YValues->ValueSource= "sb_vol";
      /*Series3->DataSource=Query2;
      Series3->ParentChart=DBChart1;
      Series3->XLabelsSource="syear*100+smon";
      Series3->YValues->ValueSource= "cp";*/
      wsprintf(szName,"c:\\gmgin\\gmgin%s.bmp",csc);
      DBChart1->SaveToBitmapFile(szName);
      Query1->Next();

 }

}
how can i autosave the chart to gif file!
0
Comment
Question by:erichuang
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 75 total points
ID: 2669625
You need a 3rd-party component that can handle
GIFs, the VCL does not contain one (since the compression algorithm
used in GIF is patent-protected and commercial software that uses GIFs
is subject to royalties). TGIFImage is good component, that
you can use. You can get it from  www.melander.dk or
www.rxlib.com

Alex
0
 

Author Comment

by:erichuang
ID: 2671596
thanks a lot again for my dear friend!
           eric  
0
 

Author Comment

by:erichuang
ID: 2671681
thanks a lot again for my dear friend!
           eric  
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question