Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2000-03-29
3
398 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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…
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 member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

791 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