MainFrm.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // MainFrm.h : interface of the CMainFrame class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MAINFRM_H__147283E8_5032_4C0A_9828_1CC59DECFD62__INCLUDED_)
  5. #define AFX_MAINFRM_H__147283E8_5032_4C0A_9828_1CC59DECFD62__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "SystemTray.h"
  10. #include "QuickPaste.h"
  11. #include "ToolTipEx.h"
  12. #include "EditFrameWnd.h"
  13. #define CLOSE_WINDOW_TIMER 1
  14. #define HIDE_ICON_TIMER 2
  15. #define REMOVE_OLD_ENTRIES_TIMER 3
  16. #define CHECK_FOR_UPDATE 4
  17. #define CLOSE_APP 5
  18. #define STOP_MONITORING_KEYBOARD_TIMER 7
  19. #define STOP_LOOKING_FOR_KEYBOARD 8
  20. #define REMOVE_OLD_REMOTE_COPIES 9
  21. #define END_DITTO_BUFFER_CLIPBOARD_TIMER 10
  22. class CMainFrame : public CFrameWnd
  23. {
  24. public:
  25. CMainFrame();
  26. protected:
  27. DECLARE_DYNAMIC(CMainFrame)
  28. // Attributes
  29. public:
  30. // Operations
  31. public:
  32. BOOL ResetKillDBTimer();
  33. // Overrides
  34. // ClassWizard generated virtual function overrides
  35. //{{AFX_VIRTUAL(CMainFrame)
  36. public:
  37. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  38. // virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  39. //}}AFX_VIRTUAL
  40. // Implementation
  41. public:
  42. virtual ~CMainFrame();
  43. #ifdef _DEBUG
  44. virtual void AssertValid() const;
  45. virtual void Dump(CDumpContext& dc) const;
  46. #endif
  47. CQuickPaste QuickPaste;
  48. CSystemTray m_TrayIcon;
  49. ULONG m_ulCopyGap;
  50. CString m_csKeyboardPaste;
  51. CToolTipEx *m_pTypingToolTip;
  52. CString csTypeToolTipTitle;
  53. CPoint m_ToolTipPoint;
  54. CAlphaBlend m_Transparency;
  55. void DoDittoCopyBufferPaste(int nCopyBuffer);
  56. void DoFirstTenPositionsPaste(int nPos);
  57. void StopLookingForKeystrokes(bool bInitAppVaribles);
  58. bool PasteQuickPasteEntry(CString csQuickPaste);
  59. bool SaveQuickPasteEntry(CString csQuickPaste, CClipList *pClipList);
  60. void ShowErrorMessage(CString csTitle, CString csMessage);
  61. bool CloseAllOpenDialogs();
  62. static void DeleteOldRemoteCopies(CString csDir);
  63. static UINT RemoteOldRemoteFilesThread(LPVOID pParam);
  64. void ShowEditWnd(CClipIDs &Ids);
  65. CEditFrameWnd *m_pEditFrameWnd;
  66. // Generated message map functions
  67. protected:
  68. //{{AFX_MSG(CMainFrame)
  69. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  70. afx_msg void OnFirstOption();
  71. afx_msg void OnFirstExit();
  72. afx_msg void OnChangeCbChain(HWND hWndRemove, HWND hWndAfter);
  73. afx_msg void OnDrawClipboard();
  74. afx_msg void OnTimer(UINT nIDEvent);
  75. afx_msg void OnFirstShowquickpaste();
  76. afx_msg void OnFirstToggleConnectCV();
  77. afx_msg void OnUpdateFirstToggleConnectCV(CCmdUI* pCmdUI);
  78. afx_msg void OnFirstHelp();
  79. //}}AFX_MSG
  80. afx_msg LRESULT OnHotKey(WPARAM wParam, LPARAM lParam);
  81. afx_msg LRESULT OnShowTrayIcon(WPARAM wParam, LPARAM lParam);
  82. // afx_msg LRESULT OnGetIsTopView(WPARAM wParam, LPARAM lParam);
  83. afx_msg LRESULT OnCopyProperties(WPARAM wParam, LPARAM lParam);
  84. afx_msg LRESULT OnShutDown(WPARAM wParam, LPARAM lParam);
  85. afx_msg LRESULT OnClipboardCopied(WPARAM wParam, LPARAM lParam);
  86. afx_msg LRESULT OnAddToDatabaseFromSocket(WPARAM wParam, LPARAM lParam);
  87. afx_msg LRESULT OnErrorOnSendRecieve(WPARAM wParam, LPARAM lParam);
  88. afx_msg LRESULT OnFocusChanged(WPARAM wParam, LPARAM lParam);
  89. afx_msg LRESULT OnCustomizeTrayMenu(WPARAM wParam, LPARAM lParam);
  90. afx_msg LRESULT OnKeyBoardChanged(WPARAM wParam, LPARAM lParam);
  91. afx_msg LRESULT OnEditWndClose(WPARAM wParam, LPARAM lParam);
  92. afx_msg LRESULT OnSetConnected(WPARAM wParam, LPARAM lParam);
  93. DECLARE_MESSAGE_MAP()
  94. public:
  95. virtual BOOL PreTranslateMessage(MSG* pMsg);
  96. afx_msg void OnClose();
  97. afx_msg void OnFirstImport();
  98. afx_msg void OnDestroy();
  99. afx_msg void OnFirstNewclip();
  100. };
  101. class CShowMainFrame
  102. {
  103. public:
  104. CShowMainFrame();
  105. ~CShowMainFrame();
  106. static bool m_bShowingMainFrame;
  107. bool m_bHideMainFrameOnExit;
  108. HWND m_hWnd;
  109. };
  110. /////////////////////////////////////////////////////////////////////////////
  111. //{{AFX_INSERT_LOCATION}}
  112. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  113. #endif // !defined(AFX_MAINFRM_H__147283E8_5032_4C0A_9828_1CC59DECFD62__INCLUDED_)