Using TeeChart with Win32 console applications

TeeChart for ActiveX, COM and ASP
Post Reply
anna
Newbie
Newbie
Posts: 3
Joined: Fri Feb 08, 2008 12:00 am
Contact:

Using TeeChart with Win32 console applications

Post by anna » Tue Sep 09, 2008 3:00 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 15, 2008 11:03 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

npsAir
Newbie
Newbie
Posts: 1
Joined: Tue Jul 24, 2007 12:00 am
Location: Lakewood, Colorado
Contact:

Was the console app problem ever resolved?

Post by npsAir » Mon Sep 15, 2008 3:47 pm

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 want to create charts and save them as gif files using a console app.

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Sep 16, 2008 7:24 am

Hi npsAir,

Please find below the answers to your questions.
Question 1 - Can TeeChartv8.0.0.4 ActiveX create charts and save as .gif files in a VS 2005 console app?
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 2 - Any advice on perhaps a different approach?
Not that I can think of.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

anna
Newbie
Newbie
Posts: 3
Joined: Fri Feb 08, 2008 12:00 am
Contact:

Post by anna » Tue Sep 16, 2008 8:34 am

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.
Hi Narcís,

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.

Post Reply