Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph PlotY in VC++ do not plot

In CWGraph control i am tring to use PlotY methode, how to pass DataY arrray as it is a VARIANT type. Can I have complete piece of code to impelement and try. Foloowing is the code i am trying.....void CNi_GraphDlg::OnButtonPlot()
{
// TODO: Add your control notification handler code here
int i;
CString buf;
VARIANT ydata = {0,1,2,3,4,5,6,7,8,9};
VARIANT xfirst = {0};
VARIANT plotperrow = {0};
VARIANT xinc = {0};
m_graph.SetEnabled(TRUE);
m_graph.SetDefaultxInc(5);
m_graph.SetDefaultxFirst(3);
m_graph.SetCaption("Plasma Current");
buf = m_graph.GetCaption();
m_graph.SetImmediateUpdates(TRUE);
// AfxMessageBox(buf);
m_graph.PlotY(ydata, xfirst, xinc, plotperrow);
// m_graph.AboutBox();
}
0 Kudos
Message 1 of 2
(3,948 Views)
If you have Measurement Studio, you should really use the native Visual C++ tools instead, they are MUCH easier for VC++ users. Just install ComponentWorks++ off the Measurement Studio CD and use the NI Measurement Studio App wizard.

If you need to stay with the default VC++ wrappers of the CWGraph control though, you can find plenty of VC++ examples for this here. (ftp://ftp.ni.com/support/mstudio/vb/samples/CW3Vc.zip)

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 2 of 2
(3,948 Views)