LineChart.h
上传用户:hbytqc8
上传日期:2014-07-31
资源大小:527k
文件大小:2k
源码类别:

SNMP编程

开发平台:

Visual C++

  1. #if !defined(AFX_LINECHART_H__ACAD2769_7319_4E2D_B2BA_1DF9B4085B8A__INCLUDED_)
  2. #define AFX_LINECHART_H__ACAD2769_7319_4E2D_B2BA_1DF9B4085B8A__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // LineChart.h : header file
  7. //
  8. #include "AfxTempl.h"
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CLineChart window
  11. class CLineChart : public CStatic
  12. {
  13. public:
  14. CLineChart(CSize cs,int row);
  15. // Attributes
  16. protected:
  17. int StartPos;
  18. int oldX,oldY;
  19. bool Cross,Useage;
  20. CString title,xLegend,yLegend;
  21. CFont tFont; 
  22. CSize ChartSize; 
  23. int Count;
  24. unsigned long Number,yMax,Temp_yMax;
  25. unsigned long xAverage,yAverage;
  26. unsigned long x_Max,x_Min,y_Max,y_Min;
  27. int interval;
  28. struct LineData
  29. {
  30. unsigned long x;
  31. unsigned long y;
  32. int xUse;
  33. int yUse;
  34. CString xTime;
  35. bool show;
  36. };
  37. CArray <LineData,LineData&> ArrayData;
  38. // Operations
  39. public:
  40. void Append(unsigned long  x1,unsigned long  y1,CString tt,int ux,int uy);
  41. void Init();
  42. void SetTitle(CString str);
  43. void SetLegend(CString xStr,CString yStr);
  44. void SetCross(bool tf);
  45. unsigned long GetXAverage();
  46. unsigned long GetYAverage();
  47. void AddData(unsigned long  x1,unsigned long  y1,CString tt,
  48.  int ux,int uy,int index,bool tf);
  49. void ToLeft();
  50. void ToRight();
  51. void SetUse(bool tf);
  52. CString GetXMax();
  53. CString GetYMax();
  54. CString GetXMin();
  55. CString GetYMin();
  56. //void ChangeInt(int x);
  57. // Overrides
  58. // ClassWizard generated virtual function overrides
  59. //{{AFX_VIRTUAL(CLineChart)
  60. //}}AFX_VIRTUAL
  61. // Implementation
  62. public:
  63. virtual ~CLineChart();
  64. // Generated message map functions
  65. protected:
  66. //{{AFX_MSG(CLineChart)
  67. afx_msg void OnPaint();
  68. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  69. //}}AFX_MSG
  70. DECLARE_MESSAGE_MAP()
  71. };
  72. /////////////////////////////////////////////////////////////////////////////
  73. //{{AFX_INSERT_LOCATION}}
  74. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  75. #endif // !defined(AFX_LINECHART_H__ACAD2769_7319_4E2D_B2BA_1DF9B4085B8A__INCLUDED_)