MicroSoft Visual C++ specific


Q: How to use TeeChart constants in MS VC++


The constants don't work natively in VC++ but you can create a Constants header file. Follow this link to download a sample TeeChart Constants header file.


Q: Where are descriptions of functions such as GetSeries(), Add() and other similar functions ?

You can use the Online helpfile for a summary of all Class method and property definitions. A good idea for some pointers is to look at the VC examples too. The VC++ tutorial explains some basic rules for syntax..

Visual Basic's:

TChart1.Series(0).Add 3, "1st value", clTeeColor

becomes

m_Chart1.GetSeries(0).Add(3,"1st Value",clTeeColor);

(assumes you have named TChart as m_Chart1 and included the TeeChartdefines.h file)


Q: Changes made at design time with the Chart Editor do not always save.


Changing Chart properties at design time
To change Chart properties at design-time, right mouseclick on the Chart on the form and select "Properties" from the menu, then click on the "TeeChart Pro Editor" tab and then the "Edit Chart..." button.  Right mouseclicking on the Chart on the Form and selecting the 'TeeChart Pro Activex Control' from the menu to display the TeeChart menu will make changes at design-time but these will be lost at run-time.


Q: How do I add/change text of the Chart Header and Footer at runtime in MS VC++ ?


COleVariant var(CString ("MyTitle"));
m_Chart1.GetHeader().GetText().Clear();
m_Chart1.GetHeader().GetText().Add(*(LPCVARIANT)var);
or
m_Chart1.GetHeader().GetText().SetItem(0, COleVariant("MyTitle"));

Q:Can I obtain any additional examples with use of TeeChart Pro for VC++?


Yes, there are additional examples that you may download by following this link:
TeeVCexamples.zip Size 494KB.