Int m_CurPos=0;
int count=0;
BOOL m_bXuanhuan=FALSE;
Float TempData=https://bbs.csdn.net/topics/20;
# define CURVEPOINT 100
Float data [100] [CURVEPOINT];
Void CGraphIOView: : the OnInitialUpdate ()
{
CFormView: : OnInitialUpdate ();
GetParentFrame () - & gt; RecalcLayout ();
ResizeParentToFit ();
For (int I=0; i<100; I++)
{
For (int j=0; j<100; J++)
{
M_fEngData [I]=0.0;
}
}
//ReadData ();
The SetTimer (1200, NULL);
Void CGraphIOView: : ShowCurve ()
{
int i=0;//I value is to show parameter curve number
CNiReal64Vector vect1 (CURVEPOINT);
//for (int I=0; i<100; I++)
{
Data [I] [m_CurPos]=m_fEngData [I];
}
//data [0] [m_CurPos]=m_fEngData [0].
If (m_bXuanhuan)
{
Int k=0;
For (int I=m_CurPos; i
Vect1 [k]=data [0] [I];
}
For (I=0; i
Vect1 [k]=data [0] [I];
}
}
The else
{
Vect1. SetSize (m_CurPos + 1);
For (int I=0; i
Vect1 [I]=data [0] [I];
}
}
M_Graph. GetPlots (). The Item (1) ChartY (vect1, 1);
M_CurPos + +;
If (m_CurPos & gt; CURVEPOINT)
{
M_bXuanhuan=TRUE;
M_CurPos=0;
}
}
Void CGraphIOView: : OnTimer (UINT nIDEvent)
{
//TODO: Add your message handler code here and/or call the default
//if (count<100)
{
//GenericData (count);
}
GenericData ();//create a random number
ShowCurve ();//generated curve
CFormView: : OnTimer (nIDEvent);
}
Void CGraphIOView: : GenericData ()
{
int i=0;
//for (I=0; i<100; I++)
{
M_fEngData [I]=rand ()/1000 + 10;
}
}
}
CodePudding user response:
Since the drawing is to learn the skills in the morning and evening,