Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Why the wave is disvisible?? I used measurement studio 7.0.1 in my existing VC++ 6.0 project

I have an existing Microsoft Visual C++ project  MyProj. I  have installed the NI measurement studio 7.0.1 on my computer yesterday.
I have added a CWGraph control on a dialog of MyProj via "Project-> Add To Project->Components and Controls...->Registered ActiveX Controls->CWGraph Control".
It created 22 classes such as "CCWGraph/CCWPlots/CCWPlot/CCWAnnotations......." in my MyProj,
Now, I create a variable m_GraphCtrl for the CCWGraph Control by classwizard.
I want to used following codes to create a wave and show on the control,  in my debugging , it's running no problem, but the control not show a wave.
I have add a plot "1" in the contrl's Properties "Plots".
I have set the "Axes-XAxis-Auto scale" and "Axes-YAxies-1-min 0: max 255" in the control's Properties.

code:
VARIANT vrtItem, vrtData, vrtFirst, vrtInc;
vrtItem.vt = VT_BSTR;
vrtItem.pcVal = "1";
vrtFirst.vt = VT_I4;
vrtFirst.lVal = 0;
vrtInc.vt = VT_I4;
vrtInc.lVal = 1;
vrtData.vt = VT_BYREF|VT_UI1;
vrtData.pbVal = CH1WaveData;//unsigned char CH1WaveData[2500];there have had value already.each value is between 0~255.
// Graphs
m_GraphCtrl.GetPlots().Item(vrtItem).ClearData();
m_GraphCtrl.GetPlots().Item(vrtItem).PlotY(vrtData, vrtFirst, vrtInc);//no wave show on the CWGraph control

//annotations
m_GraphCtrl.GetAnnotations().Item(vrtItem).GetCaption().SetXCoordinate(0.00);
m_GraphCtrl.GetAnnotations().Item(vrtItem).GetCaption().SetYCoordinate(200.00);//this codes worked good,
m_GraphCtrl.Refresh();


Who can tell me why ???
0 Kudos
Message 1 of 1
(4,915 Views)