MyTimer.cpp 671 B

123456789101112131415161718192021222324252627282930
  1. // MyTimer.cpp: implementation of the MyTimer class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "MyTimer.h"
  6. #include "LYFZIPManage.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. extern BOOL g_bWork;
  13. //////////////////////////////////////////////////////////////////////
  14. // Construction/Destruction
  15. //////////////////////////////////////////////////////////////////////
  16. MyTimer::MyTimer(int id, int nTime)
  17. {
  18. m_id=id;
  19. m_time=nTime;
  20. g_pMainWnd->KillTimer (m_id);
  21. g_bWork=1;
  22. }
  23. MyTimer::~MyTimer()
  24. {
  25. g_pMainWnd->SetTimer (m_id, m_time, NULL);
  26. g_bWork=0;
  27. }