Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2000-03-29
3
Medium Priority
?
406 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 300 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.
Suggested Courses

886 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