I'm trying to use TeeChart to generate bitmaps for reports in a Win32 console application, and I've run into a rather puzzling snag.
Up to a point everything appears to be working - the chart is created (using CreateInstance(TeeChart::CLSID_TChart) ), configured etc. as expected.
However, when we try to save the chart as a bitmap, we're receiving an E_UNEXPECTED result (irrespective of format - we're aiming for .PNG, but I've also tried several others including .BMP, which should not require any supporting DLLs).
The interesting thing is that the same (actually, it's absolutely identical!) code is working quite happily in one of our other projects (not a console app), so lacking additional information I'm assuming whatever is wrong is likely to be something to do with running in a console application environment.
Has anyone here successfully got TeeChart working in a console app? If so, I'd be interested to hear of any issues you ran into along the way.
Thanks in advance,
Anna
Using TeeChart with Win32 console applications
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anna,
You shouldn't expect any problem with that. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
You shouldn't expect any problem with that. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Was the console app problem ever resolved?
We want to create charts and save them as gif files using a console app.narcis wrote:Hi Anna,
You shouldn't expect any problem with that. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
We have used TeeChart in the past in a VB6 window app but have upgraded to Visual Studio.Net 2005 from VB6 and are hoping to use our current version of ActiveX TeeChart v8.0.0.4 with VS 2005.
Question 1 - Can TeeChartv8.0.0.4 ActiveX create charts and save as .gif files in a VS 2005 console app?
Question 2 - Any advice on perhaps a different approach?
National Park Service Air Quality Data & Webcams
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi npsAir,
Please find below the answers to your questions.
Please find below the answers to your questions.
Yes, TeeChart v8 supports exporting to GIF. You just need to create a chart an export it as shown in Tutorial 12. Tutorials can be found at TeeChart's program group.Question 1 - Can TeeChartv8.0.0.4 ActiveX create charts and save as .gif files in a VS 2005 console app?
Not that I can think of.Question 2 - Any advice on perhaps a different approach?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís,narcis wrote:Hi Anna,
You shouldn't expect any problem with that. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
We're in the process of stripping down the code into something representative we can send you. In doing so we have actually uncovered part of the puzzle though.
The code in question subscribes for a couple of events (mainly for legend text customisation) using IDispEventImpl::DispEventAdvise(). If we disable the advise call everything else works OK (but of course the legend is incomplete). When we re-enable the advise call we get the E_UNEXPECTED return when saving.
I'll try to finish putting together the sample project over the next day or so.