RealEventDlg.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #if !defined(AFX_REALEVENTDLG_H__1C66691C_CA3B_4BCF_884F_F17F7BFE108A__INCLUDED_)
  2. #define AFX_REALEVENTDLG_H__1C66691C_CA3B_4BCF_884F_F17F7BFE108A__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // RealEventDlg.h : header file
  7. //
  8. #include "stdafx.h"
  9. #include "XPButton.h"
  10. #include "ListCtrlCl.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CRealEventDlg dialog
  13. class CRealEventDlg : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CString GetAlarmFile(int type);
  18. void AddEventInfoToList(CAlarmEvent* event);
  19. CRealEventDlg(CWnd* pParent = NULL); // standard constructor
  20. ~CRealEventDlg();
  21. // Dialog Data
  22. //{{AFX_DATA(CRealEventDlg)
  23. enum { IDD = IDD_REALEVENT };
  24. //}}AFX_DATA
  25. CListCtrlCl m_ctrlGrid;
  26. //CAlarmEvent* m_pCurEvent2;
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CRealEventDlg)
  30. protected:
  31. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  32. //}}AFX_VIRTUAL
  33. // Implementation
  34. protected:
  35. // Generated message map functions
  36. //{{AFX_MSG(CRealEventDlg)
  37. virtual BOOL OnInitDialog();
  38. afx_msg void OnPaint();
  39. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  40. afx_msg void OnTimer(UINT nIDEvent);
  41. afx_msg void OnConfirm();
  42. afx_msg void OnDeleteall();
  43. afx_msg void OnDeleteall2();
  44. afx_msg void OnClose();
  45. afx_msg void OnHide();
  46. afx_msg void OnBtnEixt();
  47. //afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  48. //}}AFX_MSG
  49. DECLARE_MESSAGE_MAP()
  50. void PlaySoundTims( CString sWavPath,int iTimes );
  51. static DWORD WINAPI ThreadPlaySound( CRealEventDlg *pDlg );
  52. static DWORD WINAPI ThreadCreateWav( CRealEventDlg *pDlg );
  53. HANDLE m_hPlaysound;
  54. HANDLE m_hCreateWav;
  55. bool m_bExitThread;
  56. bool m_bComfig;
  57. public:
  58. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  59. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  60. CXPButton m_Btn_Config,m_Btn_ConfigAll,m_BtnDel,m_BtnDelAll,m_BtnExit;
  61. CString GetWeekStr( int iDayofWeek );
  62. virtual BOOL PreTranslateMessage(MSG* pMsg);
  63. CString m_sIoServerPath;
  64. bool m_bStopSound;
  65. void SetPos( int iWidth,int iHeight );
  66. bool ExistFile(CString strFileName);
  67. CStringArray m_saWavPath,m_saWavContent;
  68. bool IsCreateWavOK( CString sWavPath );
  69. void DeleteAllNotice();
  70. };
  71. //{{AFX_INSERT_LOCATION}}
  72. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  73. #endif // !defined(AFX_REALEVENTDLG_H__1C66691C_CA3B_4BCF_884F_F17F7BFE108A__INCLUDED_)