TeeChart with VS.NET problems

TeeChart for ActiveX, COM and ASP
Post Reply
David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

TeeChart with VS.NET problems

Post by David » Fri Nov 25, 2005 7:48 am

I have been struggling with a simple C++ app using Teechart ActiveX in VS.NET2003. Almost all the tutorials are in VB and I just don't know how to get corresponding C++ version, even if I just want to change the Margins at runtime. Besides, it seems Teechart hasn't been fully upgraded to VS.NET environment 'cause there were always errors when I followed the tutorial 15. Any one know where I can find better manual or tutorial for C++ users,especially VC++.NET? Thanks!

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

Post by Narcís » Fri Nov 25, 2005 8:40 am

Hi David Lin,

I'd suggest you to have a look at the document called "Using TeeChart Pro AX in VStudio .NET" available at TeeChart Pro ActiveX program group. At the examples folder you'll also find a VC++.NET example (C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Studio .NET\Vc++).
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

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Fri Nov 25, 2005 9:14 am

Hi, there,
I read the code and still I couldn't find how to change margin. :( Actually, what I concern is whether there is C++ version manual of how to change the control properties and how to use the functions, not just Visual Basic help files.
Thank you!

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

Post by Narcís » Fri Nov 25, 2005 9:53 am

Hi David,

I'm afraid there's not such a document. To change TChart margins using VC++ you can use:

Code: Select all

	m_ctrlChart.GetPanel().SetMarginUnits(1); //muPercent = 0, muPixels = 1
	m_ctrlChart.GetPanel().SetMarginLeft(100);
	m_ctrlChart.GetPanel().SetMarginRight(100);
	m_ctrlChart.GetPanel().SetMarginTop(50);
	m_ctrlChart.GetPanel().SetMarginBottom(50);
BTW: You'll also have to include Panel.cpp and Panel.h to your project and add #include "Panel.h" to the dialog implementation.

For TeeChart constants integer equivalent values you should have a look at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++\TeeChartDefines.h (default english installation path).

For setting properties in VC++, the names are the same as in VB, but you'll need to use the Get and Set prefixes as you can see in the snippet above and the example I mentioned before.

For more VC++ examples, even they are not for VC++.NET, you can have look at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++\Version 6 (default english installation path). The syntax will be the same for VC++.NET.

If you are still having problems please feel free to post them here.
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

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Post by David » Fri Nov 25, 2005 10:14 am

Hi, there,

Finally I began to have some clue of how to use it. I will try out more examples. Thanka a lot, Mr. Calvet.

Post Reply