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.

49 lines
968 B

  1. // ChrtDraw.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "pwsDoc.h"
  5. #include "PWSChart.h"
  6. #include "PwsForm.h"
  7. #include <pwsdata.hxx>
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. //------------------------------------------------------------------
  14. // update the chart displaying the data
  15. void CPwsForm::UpdateChart()
  16. {
  17. CString sz;
  18. PPWS_DATA pData = (PPWS_DATA)m_pChartData;
  19. if ( !pData ) return;
  20. // start by getting the current PWS Data from the server
  21. if ( !GetPwsData(pData) )
  22. {
  23. return;
  24. }
  25. // update the current users - easy
  26. sz.Format( "%d", pData->nTotalSessions );
  27. m_cstatic_sessions.SetWindowText(sz);
  28. // tell the chart object to do its thing
  29. m_cstatic_chart.DrawChart();
  30. // update the scale shown on the chart
  31. sz.Format( "%d", m_cstatic_chart.GetDataMax() );
  32. m_cstatic_yscale.SetWindowText(sz);
  33. }