Using TeeChart with Win32 console applications
Posted: 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
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