FileWatcherDlg.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // FileWatcherDlg.h : header file
  2. //
  3. #if !defined(AFX_FILEWATCHERDLG_H__CA611DDF_62C0_4DC0_B787_57E4F6F8B4A8__INCLUDED_)
  4. #define AFX_FILEWATCHERDLG_H__CA611DDF_62C0_4DC0_B787_57E4F6F8B4A8__INCLUDED_
  5. #include "Watcher.h" // Added by ClassView
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CFileWatcherDlg dialog
  11. #define WM_MY_NOTIFY WM_USER + 100
  12. class CFileWatcherDlg : public CDialog
  13. {
  14. // Construction
  15. public:
  16. BOOL m_bStart;
  17. BOOL IsFolder(LPCTSTR lpszPath);
  18. void OnWatch(DWORD dwAct, CString csStrName1, CString csStrName2);
  19. BOOL NotifyTray(BOOL bCreate);
  20. CString SelectPath();
  21. void InitializeListCtrl();
  22. CWatcher m_csWatcher;
  23. CFileWatcherDlg(CWnd* pParent = NULL); // standard constructor
  24. // Dialog Data
  25. //{{AFX_DATA(CFileWatcherDlg)
  26. enum { IDD = IDD_FILEWATCHER_DIALOG };
  27. CListCtrl m_csListData;
  28. CEdit m_csEdtPath;
  29. CButton m_csBtnCtrl;
  30. CString m_csStrPath;
  31. //}}AFX_DATA
  32. // ClassWizard generated virtual function overrides
  33. //{{AFX_VIRTUAL(CFileWatcherDlg)
  34. public:
  35. virtual BOOL PreTranslateMessage(MSG* pMsg);
  36. protected:
  37. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  38. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  39. //}}AFX_VIRTUAL
  40. // Implementation
  41. protected:
  42. HICON m_hIcon;
  43. // Generated message map functions
  44. //{{AFX_MSG(CFileWatcherDlg)
  45. virtual BOOL OnInitDialog();
  46. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  47. afx_msg void OnPaint();
  48. afx_msg HCURSOR OnQueryDragIcon();
  49. afx_msg void OnRclickListData(NMHDR* pNMHDR, LRESULT* pResult);
  50. afx_msg void OnMnuOpen();
  51. afx_msg void OnMnuDelsel();
  52. afx_msg void OnMnuDelall();
  53. afx_msg void OnBtnCtrl();
  54. afx_msg void OnOK();
  55. afx_msg void OnCancel();
  56. afx_msg void OnSize(UINT nType, int cx, int cy);
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. };
  60. //{{AFX_INSERT_LOCATION}}
  61. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  62. #endif // !defined(AFX_FILEWATCHERDLG_H__CA611DDF_62C0_4DC0_B787_57E4F6F8B4A8__INCLUDED_)