Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a pogram in VC++ 2008 made with Windows Forms that make a matematic function graph with the Zedgraph.dll how in examples, but I want now to show the data, while it is computing, to show data real time or minimal in dynamic form step by step. I know that there is an exmple in the wiki:

http://www.zedgraph.org/wiki/index.php?title=Display_Dynamic_or_Real-Time_Data[^]

but it has the example in C# and it includes a conversion that I can´t make run good in VC++ with the c# code:

LineItem curve = zedGraphControl1.GraphPane.CurveList[0] as LineItem;

and

IPointListEdit list = curve.Points as IPointListEdit;

and VC++ 2008 don´t have "as" operator and it generate 2 errors, this is only the problem.
Posted

Did you try casting the object by removing the as and placing it right after the equal sign?
 
Share this answer
 
Thaks! I have find the correct code for my problem and is this:

LineItem ^curve = dynamic_cast<LineItem ^>(zedGraphControl1->GraphPane->CurveList[0]);

And the other line:

IPointListEdit ^list = dynamic_cast <IPointListEdit^>(curve->Points);


All works good with "dynamic_cast" operator in C++
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900