目前我编了一个采集波形图的程序,波形可以显示了,只是不知道如何保存显示的波形,我用的是Picture控件来显示波形,且设置的属性石Rectangle  黑色。显示波形的代码如下:
void CPCIDlg::Figure(int Dots,double Data[],int PictureID,COLORREF crColor,int Width)
{
int i; 
CPoint StartPt,EndPt; 
CDC *pDC; 
CStatic* pTxt=(CStatic*)GetDlgItem(PictureID); 
pDC=pTxt->GetDC(); 
CPen pen; 
pen.CreatePen(PS_SOLID,Width,crColor); 
pDC->SelectObject(&pen); 
CRect rc; 
pTxt->GetClientRect(&rc); 
for(i=0;i<Dots;i++) 

 StartPt.x=(int)(rc.left+i*rc.Width()/Dots); 
StartPt.y=(int)(rc.Height()/2+(rc.Height()/2*Data[i]*(-1))); 
EndPt.x=(int)(rc.left+(i+1)*rc.Width()/Dots); 
EndPt.y=(int)(rc.Height()/2+(rc.Height()/2*Data[i+1]*(-1)));
 if(StartPt.y<rc.top || EndPt.y<rc.top) StartPt.y=EndPt.y=rc.top; 
if(StartPt.y>rc.bottom || EndPt.y>rc.bottom) StartPt.y=EndPt.y=rc.bottom;
pDC->MoveTo(StartPt.x,StartPt.y);
pDC->LineTo(EndPt);
}
pen.DeleteObject();
pTxt->ReleaseDC(pDC);
}