Dlg_RealTimeCurve.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include "MultiColorPlotCtrl.h"
  3. #define MAX_NUM 60
  4. // CDlg_RealTimeCurve 对话框
  5. class CDlg_RealTimeCurve : public CDialog
  6. {
  7. DECLARE_DYNAMIC(CDlg_RealTimeCurve)
  8. public:
  9. CDlg_RealTimeCurve(CWnd* pParent = NULL); // 标准构造函数
  10. virtual ~CDlg_RealTimeCurve();
  11. // 对话框数据
  12. enum { IDD = IDD_DLG_REALTIMECURVE };
  13. protected:
  14. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
  15. DECLARE_MESSAGE_MAP()
  16. public:
  17. virtual BOOL OnInitDialog();
  18. afx_msg void OnTimer(UINT nIDEvent);
  19. afx_msg void OnPaint();
  20. void Draw();
  21. void DrawHKedu(CDC* pDC, CRect rect, int nKedu, COLORREF clrKedu);
  22. void DrawVKedu(CDC* pDC, CRect rect, int nKedu, COLORREF clrKedu);
  23. void DrawCurve(CDC* pDC, CRect rect, int* data, COLORREF color);
  24. int m_nValue1[MAX_NUM];
  25. int m_nLowwer;
  26. int m_nUpper;
  27. int m_nLowerLimit;
  28. int m_nUpperLimit;
  29. CString m_sVarName;
  30. CString m_sVarDes;
  31. CMultiColorPlotCtrl m_ctrlMultiColorPlot;
  32. // 关键代码
  33. CRITICAL_SECTION g_cs ;
  34. CString m_sCurData;
  35. int getMin( int iLowwer );
  36. int getMax( int iUpper );
  37. };