VC++ example "Surface" does not work!
VC++ example "Surface" does not work!
When I compile the surface example and run it.
This line in function void CSurfaceDlg::FillSurface()
aSeries.SetNumZValues(m_ctrlSlider.GetPos());
throws an exception. !
The message is
Invalid Number of parameters !
As it is a "working" example of how to use TeeChart, I wonder why I get the exception... of course I assume it is a real working example.
This line in function void CSurfaceDlg::FillSurface()
aSeries.SetNumZValues(m_ctrlSlider.GetPos());
throws an exception. !
The message is
Invalid Number of parameters !
As it is a "working" example of how to use TeeChart, I wonder why I get the exception... of course I assume it is a real working example.
The project is in surface.zip under Examples: VC++Pep wrote:Hi,
which example are you referencing ?
Best Regards !
Josep Lluis Jorge
http://support.steema.com
This example is not included in the TeeChart Pro AX installation. Are you sure this project has not been created by you ?
Josep Lluis Jorge
http://support.steema.com
Josep Lluis Jorge
http://support.steema.com
No I have not done a surface example yet, I soon need to get to do it, and that is why I studied the surface example delivered by Teechart.Pep wrote:This example is not included in the TeeChart Pro AX installation. Are you sure this project has not been created by you ?
Josep Lluis Jorge
http://support.steema.com
I noticed the readem file say';s it's version 3 ! Perhaps the things is so old it not longer sorks with TeeChart 6.
When I installed Version 6 it put a zip file in the examples directory in an the zip file is a Readme.txt
this is the contents of the readme (notice it says version 3)
*************************************
* TeeChart Pro ActiveX version 3 *
* *
* Examples for MS Visual C++ *
* *
* teeMach SL, Barcelona *
* www.teemach.com *
* email sales@teemach.com *
*************************************
Contents
========
The Zipfile includes the following examples:
1. Automation.zip - example of OLE Automation
2. Dragging.zip - Interactive Charts using mouse events
3. JPEG.zip - Save TeeChart to JPEG file
4. Printing.zip - Sharing a Chart with text on a printed page
5. Scrolling.zip - Add points and scroll Chart
6. Surface.zip - Use of Surface Series
All examples use the TeeChartDefines.H constant header file.
You will need to add this file to the workspace folder of
each project.
I've tried to compile this example (from the zip file) and compiles/runs fine here.
Could you please re-download the zip file which contains all the examples from .
http://www.steema.com/support/faq/NewAX ... amples.zip
unzip and test it again ?
Josep Lluis Jorge
http://support.steema.com
Could you please re-download the zip file which contains all the examples from .
http://www.steema.com/support/faq/NewAX ... amples.zip
unzip and test it again ?
Josep Lluis Jorge
http://support.steema.com
Same problem
OK I donwloaded the and compiled it again.Pep wrote:I've tried to compile this example (from the zip file) and compiles/runs fine here.
Could you please re-download the zip file which contains all the examples from .
http://www.steema.com/support/faq/NewAX ... amples.zip
unzip and test it again ?
Josep Lluis Jorge
http://support.steema.com
The same problem
In the function FillSurface() the line
"aSeries.SetNumZValues(m_ctrlSlider.GetPos());" is the problem
I glad to see the sampel does come from TeeChart
Hans W
void CSurfaceDlg::FillSurface()
{
>>>>>>> code removed here for clarity
// set initial surface size (rows x columns)
aSeries.SetNumXValues(m_ctrlSlider.GetPos());
aSeries.SetNumZValues(m_ctrlSlider.GetPos()); // This line is the problem
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
If you're after a TeeChart VC++ surface example build with a version of TeeChart AX less than four years old, may I suggest that you have a look at the example under:
C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual C++\Version 6\SeriesTextSource
Best regards,
Christopher Ireland
C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual C++\Version 6\SeriesTextSource
Best regards,
Christopher Ireland
I'm looking a an example that works.Christopher Ireland wrote:If you're after a TeeChart VC++ surface example build with a version of TeeChart AX less than four years old, may I suggest that you have a look at the example under:
C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX Control\Examples\Visual C++\Version 6\SeriesTextSource
Best regards,
Christopher Ireland
The example you suggested simply shows an open frame, and there is no way to add data to it.
Hello,
In the sample from the FAQ it should work if you comment out the aSeries.SetNumZValues line. (it worked here with that change).
At least it'll work as a TeeChart AX v3 and v4 project. ...To use it with later versions of TeeChart it'll need to be updated with the update utilities ..or rebuilt, then copy/pasting the code to the new project.
(See below for later versions)
eg.
In version 5 the TeeChart Series property was changed to a method to make it compatible with Visual Studio.NET ...therefore all GetSeries(xx) become Series(xx). In this project there's a path problem (or other?) to the correct font source so I commented a font size change, maybe someone can find the cause.
I've updated the project to v6 and I'll put it on the attachments newsgroup:
[url]news://www.berneda.com/steema.public.attachments[/url]
Regards,
Marc Meumann
Steema Support
In the sample from the FAQ it should work if you comment out the aSeries.SetNumZValues line. (it worked here with that change).
At least it'll work as a TeeChart AX v3 and v4 project. ...To use it with later versions of TeeChart it'll need to be updated with the update utilities ..or rebuilt, then copy/pasting the code to the new project.
(See below for later versions)
eg.
Code: Select all
void CSurfaceDlg::FillSurface()
{
CString strSlider;
strSlider.Format("%d x %d", m_ctrlSlider.GetPos(), m_ctrlSlider.GetPos());
m_stSize.SetWindowText(strSlider);
// remove all surface points...
m_ctrlChart.GetSeries(0).Clear();
// This also makes a type check
CSurfaceSeries aSeries = m_ctrlChart.GetSeries(0).GetAsSurface();
// set initial surface size (rows x columns)
aSeries.SetNumXValues(m_ctrlSlider.GetPos());
//aSeries.SetNumZValues(m_ctrlSlider.GetPos());
// add surface points with a loop
int nMaxPoints = aSeries.GetNumXValues();
for(int x = 1; x <= nMaxPoints; x++)
{
for (int z = 1; z <= nMaxPoints; z++)
{
double d= nMaxPoints * 0.2;
aSeries.AddXYZ(x, 0.5 * cos(x / d)
+ cos(z / d), z, "", clTeeColor);
}
}
}
In version 5 the TeeChart Series property was changed to a method to make it compatible with Visual Studio.NET ...therefore all GetSeries(xx) become Series(xx). In this project there's a path problem (or other?) to the correct font source so I commented a font size change, maybe someone can find the cause.
I've updated the project to v6 and I'll put it on the attachments newsgroup:
[url]news://www.berneda.com/steema.public.attachments[/url]
Regards,
Marc Meumann
Steema Support
Thanks for the help, I would like to see the modfied example.
However I cannot access
news://www.berneda.com/steema.public.attachments
The error message read "the newsgroup doe snot exisit on bernada.com" !
That's why I like this new forum at least I can acess it...
Is there anyway to get the file directly...?
However I cannot access
news://www.berneda.com/steema.public.attachments
The error message read "the newsgroup doe snot exisit on bernada.com" !
That's why I like this new forum at least I can acess it...
Is there anyway to get the file directly...?
Could you please check it again. I've just test it now and I can access.
Josep Lluis Jorge
http://support.steema.com
Josep Lluis Jorge
http://support.steema.com
Does not work here...Pep wrote:Could you please check it again. I've just test it now and I can access.
Josep Lluis Jorge
http://support.steema.com
Thi is the message I get from Netscape 7.1
http://hans-w.com/steema.jpg
Have you tried to access using Outlook Express or similar .. ?
If you still having problems, could you please tell me an email which I can use to send it to you directly ?
Josep Lluis Jorge
http://support.steema.com
If you still having problems, could you please tell me an email which I can use to send it to you directly ?
Josep Lluis Jorge
http://support.steema.com