Page 1 of 1

Visual Studio C++ example code

Posted: Wed Jan 25, 2006 7:19 am
by 9529087
I am finding it very frustrating to use your API.
All of the example code is in visual basic. I don't use or understand visual basic. Why don't you include visual studio c++ examples? How much more work would it be to match the visual basic ones?

I can't even get the basic dragging gantt chart to work ... it just draws the gantt. I have no idea what any of the code is doing.

Why does the c++ code have to be so poorly documented. Why bother selling c++ if most of the documentation involves visual basic?

Do you have any more example code using c++? I'd really like to be able to use the gantt tool and customize it so that there is no date on the bottom ... just seconds for an animation tool.

Is there any more documentation anywhere about the c++ interface to the tool? I like the look of your tools and want to be able to use it at our studio but I cannot recommend it anymore.

Nick

Posted: Wed Jan 25, 2006 8:43 am
by narcis
Hi Nick,

Have you seen the examples at C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++\Version 6, specially the C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual C++\Version 6\Dragging Points example for dragging series points?

Posted: Wed Jan 25, 2006 6:16 pm
by 9529087
My main concern is that you don't provide c++ examples because its hard for you to do so, which means its hard for us to figure out. Otherwise you could convert about 5-10 of the VB examples every day.

Anyways, to the point.
I'm having difficulty getting the Gantt and mouse drag example to work in c++. The VB source looks very simple. How would I do this in c++?

NT

Posted: Thu Jan 26, 2006 11:46 am
by narcis
Hi NT,

First of all, it would be helpful for you to have a look at "Tutorial 15 - MS VC++ Applications". TeeChart tutorials can be found at TeeChart's program group. For a list of constants for VC++ applicationis please see TeeChartDefines.h at C:\Program Files\Steema Software\TeeChart Pro v7

ActiveX Control\Examples\Visual C++
(default english installation path)

To have a gantt series being mouse draggable you just need to use a Gantt Tool which allows the gantt series being dragged as shown here:

Code: Select all

void CGanttDragExampleDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	m_Chart1.GetLegend().SetVisible(false);
	m_Chart1.AddSeries(8);
	m_Chart1.Series(0).FillSampleValues(8);

	m_Chart1.GetTools().Add(15);

	VARIANT SourceSeries;
	SourceSeries.vt=VT_DISPATCH;
	CSeries InputSeries=m_Chart1.Series(0);
	SourceSeries.pdispVal=InputSeries;

	m_Chart1.GetTools().GetItems(0).GetAsGantt().SetSeries(SourceSeries);
}
If you want I can also send the full project.