MainFrm.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #pragma once
  2. #include "SystemTray.h"
  3. #include "QuickPaste.h"
  4. #include "ToolTipEx.h"
  5. #include "EditFrameWnd.h"
  6. #include "MainFrmThread.h"
  7. #include "ClipboardSaveRestore.h"
  8. #define CLOSE_WINDOW_TIMER 1
  9. #define HIDE_ICON_TIMER 2
  10. #define REMOVE_OLD_ENTRIES_TIMER 3
  11. #define REMOVE_OLD_REMOTE_COPIES 6
  12. #define END_DITTO_BUFFER_CLIPBOARD_TIMER 7
  13. #define KEY_STATE_MODIFIERS 8
  14. #define ACTIVE_WINDOW_TIMER 9
  15. #define FOCUS_CHANGED_TIMER 10
  16. #define TEXT_ONLY_PASTE 11
  17. class CMainFrame: public CFrameWnd
  18. {
  19. public:
  20. CMainFrame();
  21. protected:
  22. DECLARE_DYNAMIC(CMainFrame)
  23. // Attributes
  24. public:
  25. // Operations
  26. public:
  27. BOOL ResetKillDBTimer();
  28. // Overrides
  29. // ClassWizard generated virtual function overrides
  30. //{{AFX_VIRTUAL(CMainFrame)
  31. public:
  32. virtual BOOL PreCreateWindow(CREATESTRUCT &cs);
  33. // virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  34. //}}AFX_VIRTUAL
  35. // Implementation
  36. public:
  37. virtual ~CMainFrame();
  38. #ifdef _DEBUG
  39. virtual void AssertValid()const;
  40. virtual void Dump(CDumpContext &dc)const;
  41. #endif
  42. CQuickPaste m_quickPaste;
  43. CSystemTray m_TrayIcon;
  44. ULONG m_ulCopyGap;
  45. CString m_csKeyboardPaste;
  46. CAlphaBlend m_Transparency;
  47. BYTE m_keyStateModifiers;
  48. DWORD m_startKeyStateTime;
  49. bool m_bMovedSelectionMoveKeyState;
  50. short m_keyModifiersTimerCount;
  51. HWND m_tempFocusWnd;
  52. CMainFrmThread m_thread;
  53. CClipboardSaveRestore m_textOnlyPaste;
  54. CDialog *m_pGlobalClips;
  55. CPropertySheet *m_pOptions;
  56. void DoDittoCopyBufferPaste(int nCopyBuffer);
  57. void DoFirstTenPositionsPaste(int nPos);
  58. bool PasteQuickPasteEntry(CString csQuickPaste);
  59. bool SaveQuickPasteEntry(CString csQuickPaste, CClipList *pClipList);
  60. void ShowErrorMessage(CString csTitle, CString csMessage);
  61. bool CloseAllOpenDialogs();
  62. void DoTextOnlyPaste();
  63. void ShowEditWnd(CClipIDs &Ids);
  64. CEditFrameWnd *m_pEditFrameWnd;
  65. // Generated message map functions
  66. protected:
  67. //{{AFX_MSG(CMainFrame)
  68. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  69. afx_msg void OnFirstOption();
  70. afx_msg void OnFirstExit();
  71. afx_msg void OnChangeCbChain(HWND hWndRemove, HWND hWndAfter);
  72. afx_msg void OnDrawClipboard();
  73. afx_msg void OnTimer(UINT_PTR nIDEvent);
  74. afx_msg void OnFirstShowquickpaste();
  75. afx_msg void OnFirstToggleConnectCV();
  76. afx_msg void OnUpdateFirstToggleConnectCV(CCmdUI *pCmdUI);
  77. afx_msg void OnFirstHelp();
  78. //}}AFX_MSG
  79. afx_msg LRESULT OnHotKey(WPARAM wParam, LPARAM lParam);
  80. afx_msg LRESULT OnShowTrayIcon(WPARAM wParam, LPARAM lParam);
  81. afx_msg LRESULT OnClipboardCopied(WPARAM wParam, LPARAM lParam);
  82. afx_msg LRESULT OnAddToDatabaseFromSocket(WPARAM wParam, LPARAM lParam);
  83. afx_msg LRESULT OnErrorOnSendRecieve(WPARAM wParam, LPARAM lParam);
  84. afx_msg LRESULT OnFocusChanged(WPARAM wParam, LPARAM lParam);
  85. afx_msg LRESULT OnCustomizeTrayMenu(WPARAM wParam, LPARAM lParam);
  86. afx_msg LRESULT OnEditWndClose(WPARAM wParam, LPARAM lParam);
  87. afx_msg LRESULT OnSetConnected(WPARAM wParam, LPARAM lParam);
  88. afx_msg LRESULT OnLoadClipOnClipboard(WPARAM wParam, LPARAM lParam);
  89. afx_msg LRESULT OnSystemTrayMouseMove(WPARAM wParam, LPARAM lParam);
  90. afx_msg LRESULT OnGlobalClipsClosed(WPARAM wParam, LPARAM lParam);
  91. afx_msg LRESULT OnOptionsClosed(WPARAM wParam, LPARAM lParam);
  92. afx_msg LRESULT OnShowOptions(WPARAM wParam, LPARAM lParam);
  93. DECLARE_MESSAGE_MAP()public:
  94. virtual BOOL PreTranslateMessage(MSG *pMsg);
  95. afx_msg void OnClose();
  96. afx_msg void OnFirstImport();
  97. afx_msg void OnDestroy();
  98. afx_msg void OnFirstNewclip();
  99. afx_msg void OnFirstGlobalhotkeys();
  100. };