Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

760 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now