Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.4 KiB

  1. // PWSChart.h : header file
  2. //
  3. enum {
  4. PWS_CHART_HOURLY = 0,
  5. PWS_CHART_DAILY
  6. };
  7. enum {
  8. PWS_CHART_SESSIONS = 0,
  9. PWS_CHART_HITS,
  10. PWS_CHART_KB,
  11. PWS_CHART_HITS_PER_USER,
  12. PWS_CHART_KB_PER_USER,
  13. PWS_CHART_LAST
  14. };
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CPWSChart window
  17. class CPWSChart : public CStatic
  18. {
  19. // Construction
  20. public:
  21. CPWSChart();
  22. void SetDataPointer( PVOID pData ) {m_pData = pData;}
  23. // controls what and how it draws
  24. void SetTimePeriod( WORD flag ) {m_period = flag;}
  25. void SetDataType( WORD flag ) {m_dataType = flag;}
  26. DWORD GetDataMax() {return m_max;}
  27. // Attributes
  28. public:
  29. // Operations
  30. public:
  31. // Overrides
  32. // ClassWizard generated virtual function overrides
  33. //{{AFX_VIRTUAL(CPWSChart)
  34. //}}AFX_VIRTUAL
  35. // Implementation
  36. public:
  37. virtual ~CPWSChart();
  38. // draw the chart (public)
  39. void DrawChart();
  40. // Generated message map functions
  41. protected:
  42. //{{AFX_MSG(CPWSChart)
  43. afx_msg void OnPaint();
  44. //}}AFX_MSG
  45. DECLARE_MESSAGE_MAP()
  46. // get the appropriate, scaled data value
  47. DWORD GetDataValue( DWORD i );
  48. // draw the chart (protected)
  49. void DrawChart( CDC* dc );
  50. // the data
  51. PVOID m_pData;
  52. WORD m_period;
  53. WORD m_dataType;
  54. DWORD m_max;
  55. SYSTEMTIME m_timeCurrent;
  56. };
  57. /////////////////////////////////////////////////////////////////////////////