//IDC_LINE_CHART_CTRL is the control ID
m_wndLineChart.SubclassDlgItem(IDC_LINE_CHART_CTRL, this);
4. 初始化该控件:
m_wndLineChart.Add(RGB(0,255,0),100, 0);
m_wndLineChart.Add(RGB(255,255,0),100, 0);
m_wndLineChart.Add(RGB(0,255,255),100, 0);
SetTimer(1, 500, NULL); // Create a timer to update the control
5. 在OnTimer(UINT nIDEvent) 中添加下面代码:
m_wndLineChart.SetPos(0,nPos0); // nPos0 is the currect postion
m_wndLineChart.SetPos(1,nPos1); // nPos1 is the currect postion
m_wndLineChart.SetPos(2,nPos2); // nPos2 is the currect postion
m_wndLineChart.Go(); // Make sure that the control updates with the new value