Solved

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

Posted on 2000-03-29
3
400 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
[X]
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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

729 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