DlgChatPreferences.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #ifndef __DlgChatPreferences_h__
  2. #define __DlgChatPreferences_h__
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. /////////////////////////////////////////////////////////////////////////////
  7. // DlgChatPreferences.h : header file
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10. // Forward Declaration
  11. class CPageChat;
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CDlgChatPreferences dialog
  14. class CDlgChatPreferences : public CDialog
  15. {
  16. // Declarations
  17. public:
  18. DECLARE_MESSAGE_MAP()
  19. // Construction
  20. public:
  21. CDlgChatPreferences(CPageChat* pPage);
  22. // Attributes:
  23. protected:
  24. bool IsAdminPageMonitored() const
  25. {
  26. return m_bAdminMessageBox || m_bAdminRun || m_bAdminChatList;
  27. }
  28. bool IsChatMonitored() const
  29. {
  30. return !!m_bEnableChatList;
  31. }
  32. CPageChat* GetPage()
  33. {
  34. return m_pPage;
  35. }
  36. // Overrides
  37. public:
  38. // ClassWizard generated virtual function overrides
  39. //{{AFX_VIRTUAL(CDlgChatPreferences)
  40. protected:
  41. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. protected:
  45. void LoadFromRegistry();
  46. void SaveToRegistry();
  47. bool ShortcutExists();
  48. void UpdateUI();
  49. // Message Handlers
  50. protected:
  51. // Generated message map functions
  52. //{{AFX_MSG(CDlgChatPreferences)
  53. virtual BOOL OnInitDialog();
  54. virtual void OnOK();
  55. afx_msg void OnEnableChatList();
  56. afx_msg void OnUnlimitedChatHistory();
  57. afx_msg void OnLimitChatHistory();
  58. afx_msg void OnAdminRun();
  59. afx_msg void OnAdminRunProperties();
  60. afx_msg void OnAdminRunTest();
  61. //}}AFX_MSG
  62. // Data Members
  63. protected:
  64. //{{AFX_DATA(CDlgChatPreferences)
  65. enum { IDD = IDD_CHAT_PREFERENCES };
  66. CButton m_btnAdminRunProperties;
  67. CButton m_btnUnlimitedChat;
  68. CButton m_btnLimitChat;
  69. CEdit m_editChatListLimit;
  70. CStatic m_staticChatListLimit;
  71. BOOL m_bAdminChatList;
  72. BOOL m_bAdminMessageBox;
  73. BOOL m_bAdminRun;
  74. BOOL m_bEnableChatList;
  75. int m_eChatListLimit;
  76. DWORD m_dwChatListLimit;
  77. //}}AFX_DATA
  78. protected:
  79. CString m_strShortcutPath;
  80. CPageChat* m_pPage;
  81. // Friends
  82. protected:
  83. friend class CPageChat;
  84. };
  85. /////////////////////////////////////////////////////////////////////////////
  86. //{{AFX_INSERT_LOCATION}}
  87. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  88. /////////////////////////////////////////////////////////////////////////////
  89. #endif // !__DlgChatPreferences_h__