QPasteWnd.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. #if !defined(AFX_QPASTEWND_H__65261F0F_FEFD_48CF_A0CD_01D8BFEB353B__INCLUDED_)
  2. #define AFX_QPASTEWND_H__65261F0F_FEFD_48CF_A0CD_01D8BFEB353B__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // QPasteWnd.h : header file
  7. //
  8. #include "QListCtrl.h"
  9. #include "ComboBoxSearch.h"
  10. #include "WndEx.h"
  11. #include "GroupStatic.h"
  12. #include "GroupTree.h"
  13. #include "AlphaBlend.h"
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CQPasteWnd window
  16. class CQPasteWnd : public CWndEx
  17. {
  18. // Construction
  19. public:
  20. CQPasteWnd();
  21. // Attributes
  22. public:
  23. // Operations
  24. public:
  25. // Overrides
  26. // ClassWizard generated virtual function overrides
  27. //{{AFX_VIRTUAL(CQPasteWnd)
  28. public:
  29. virtual BOOL Create(const POINT& ptStart, CWnd* pParentWnd);
  30. virtual BOOL PreTranslateMessage(MSG* pMsg);
  31. protected:
  32. //}}AFX_VIRTUAL
  33. // Implementation
  34. public:
  35. bool Add(const CString &csHeader, const CString &csText, int nID);
  36. virtual ~CQPasteWnd();
  37. void UpdateFont();
  38. //protected:
  39. CQListCtrl m_lstHeader;
  40. #ifdef AFTER_98
  41. CAlphaBlend m_Alpha;
  42. #endif
  43. CFont m_TitleFont;
  44. CComboBoxSearch m_cbSearch;
  45. CFont m_SearchFont;
  46. CButton m_btCancel;
  47. bool m_bHideWnd;
  48. CMainTable m_Recset;
  49. CString m_strSQLSearch;
  50. CGroupStatic m_stGroup;
  51. CFont GroupFont;
  52. CString m_Title;
  53. CGroupTree m_GroupTree;
  54. CBitmapButton m_ShowGroupsFolderBottom;
  55. CBitmapButton m_ShowGroupsFolderTop;
  56. CBitmapButton m_BackButton;
  57. bool m_bAllowRepaintImmediately;
  58. void RefreshNc( bool bRepaintImmediately = false );
  59. void UpdateStatus( bool bRepaintImmediately = false ); // regenerates the status (caption) text
  60. BOOL FillList(CString csSQLSearch = "");
  61. BOOL HideQPasteWindow();
  62. BOOL ShowQPasteWindow(BOOL bFillList = TRUE);
  63. void MoveControls();
  64. void DeleteSelectedRows();
  65. BOOL OpenID(long lID, bool bOnlyLoad_CF_TEXT = false, bool bPasteHTMLAs_CF_TEXT = false);
  66. BOOL OpenSelection(bool bOnlyLoad_CF_TEXT = false, bool bPasteHTMLAs_CF_TEXT = false);
  67. BOOL OpenIndex( long nItem );
  68. BOOL NewGroup( bool bGroupSelection = true );
  69. // moves the caret to the given ID, selects it, and ensures it is visible.
  70. BOOL SetListID( long lID );
  71. CString LoadDescription( int nItem );
  72. bool SaveDescription( int nItem, CString text );
  73. //Menu Items
  74. void SetLinesPerRow(long lLines);
  75. void SetTransparency(long lPercent);
  76. void OnUpdateLinesPerRow(CCmdUI* pCmdUI, int nValue);
  77. void OnUpdateTransparency(CCmdUI* pCmdUI, int nValue);
  78. void SetMenuChecks(CMenu *pMenu);
  79. void SetSendToMenu(CMenu *pMenu, int nMenuID, int nArrayPos);
  80. BOOL SendToFriendbyPos(int nPos);
  81. // Generated message map functions
  82. protected:
  83. //{{AFX_MSG(CQPasteWnd)
  84. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  85. afx_msg void OnSize(UINT nType, int cx, int cy);
  86. afx_msg void OnSetFocus(CWnd* pOldWnd);
  87. afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  88. afx_msg void OnMenuLinesperrow1();
  89. afx_msg void OnMenuLinesperrow2();
  90. afx_msg void OnMenuLinesperrow3();
  91. afx_msg void OnMenuLinesperrow4();
  92. afx_msg void OnMenuLinesperrow5();
  93. afx_msg void OnMenuTransparency10();
  94. afx_msg void OnMenuTransparency15();
  95. afx_msg void OnMenuTransparency20();
  96. afx_msg void OnMenuTransparency25();
  97. afx_msg void OnMenuTransparency30();
  98. afx_msg void OnMenuTransparency40();
  99. afx_msg void OnMenuTransparency5();
  100. afx_msg void OnMenuTransparencyNone();
  101. afx_msg void OnRclickQuickPaste(NMHDR* pNMHDR, LRESULT* pResult);
  102. afx_msg void OnMenuDelete();
  103. afx_msg void OnMenuPositioningAtcaret();
  104. afx_msg void OnMenuPositioningAtcursor();
  105. afx_msg void OnMenuPositioningAtpreviousposition();
  106. afx_msg void OnMenuOptions();
  107. afx_msg void OnCancelFilter();
  108. afx_msg void OnMenuExitprogram();
  109. afx_msg void OnMenuToggleConnectCV();
  110. afx_msg void OnMenuProperties();
  111. afx_msg void OnClose();
  112. afx_msg void OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult);
  113. afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  114. afx_msg void GetDispInfo(NMHDR* pNMHDR, LRESULT* pResult);
  115. afx_msg void OnFindItem(NMHDR* pNMHDR, LRESULT* pResult);
  116. afx_msg void OnMenuFirsttenhotkeysUsectrlnum();
  117. afx_msg void OnMenuFirsttenhotkeysShowhotkeytext();
  118. afx_msg void OnMenuQuickoptionsAllwaysshowdescription();
  119. afx_msg void OnMenuQuickoptionsDoubleclickingoncaptionTogglesalwaysontop();
  120. afx_msg void OnMenuQuickoptionsDoubleclickingoncaptionRollupwindow();
  121. afx_msg void OnMenuQuickoptionsDoubleclickingoncaptionTogglesshowdescription();
  122. afx_msg void OnMenuQuickoptionsPromptfornewgroupnames();
  123. afx_msg void OnShowGroupsBottom();
  124. afx_msg void OnShowGroupsTop();
  125. afx_msg void OnMenuViewgroups();
  126. afx_msg void OnMenuQuickpropertiesSettoneverautodelete();
  127. afx_msg void OnMenuQuickpropertiesAutodelete();
  128. afx_msg void OnMenuQuickpropertiesRemovehotkey();
  129. afx_msg void OnUpdateMenuGroupsMovetothegroupBlank(CCmdUI* pCmdUI);
  130. afx_msg void OnMenuSenttoFriendEight();
  131. afx_msg void OnMenuSenttoFriendEleven();
  132. afx_msg void OnMenuSenttoFriendFifteen();
  133. afx_msg void OnMenuSenttoFriendFive();
  134. afx_msg void OnMenuSenttoFriendFore();
  135. afx_msg void OnMenuSenttoFriendForeteen();
  136. afx_msg void OnMenuSenttoFriendNine();
  137. afx_msg void OnMenuSenttoFriendSeven();
  138. afx_msg void OnMenuSenttoFriendSix();
  139. afx_msg void OnMenuSenttoFriendTen();
  140. afx_msg void OnMenuSenttoFriendThirteen();
  141. afx_msg void OnMenuSenttoFriendThree();
  142. afx_msg void OnMenuSenttoFriendTwelve();
  143. afx_msg void OnMenuSenttoFriendTwo();
  144. afx_msg void OnMenuSenttoFriendone();
  145. afx_msg void OnMenuSenttoPromptforip();
  146. afx_msg void OnMenuGroupsMovetogroup();
  147. afx_msg void OnMenuPasteplaintextonly();
  148. afx_msg void OnMenuHelp();
  149. afx_msg void OnMenuQuickoptionsFont();
  150. afx_msg void OnMenuQuickoptionsShowthumbnails();
  151. afx_msg void OnMenuQuickoptionsDrawrtftext();
  152. afx_msg void OnMenuQuickoptionsPasteclipafterselection();
  153. afx_msg void OnSearchEditChange();
  154. afx_msg void OnMenuQuickoptionsFindasyoutype();
  155. afx_msg void OnMenuQuickoptionsEnsureentirewindowisvisible();
  156. afx_msg void OnMenuQuickoptionsShowclipsthatareingroupsinmainlist();
  157. afx_msg void OnMenuPastehtmlasplaintext();
  158. afx_msg void OnUpdateMenuNewgroup(CCmdUI* pCmdUI);
  159. afx_msg void OnUpdateMenuNewgroupselection(CCmdUI* pCmdUI);
  160. afx_msg void OnUpdateMenuAllwaysontop(CCmdUI* pCmdUI);
  161. afx_msg void OnUpdateMenuViewfulldescription(CCmdUI* pCmdUI);
  162. afx_msg void OnUpdateMenuViewgroups(CCmdUI* pCmdUI);
  163. afx_msg void OnUpdateMenuPasteplaintextonly(CCmdUI* pCmdUI);
  164. afx_msg void OnUpdateMenuDelete(CCmdUI* pCmdUI);
  165. afx_msg void OnUpdateMenuProperties(CCmdUI* pCmdUI);
  166. //}}AFX_MSG
  167. afx_msg LRESULT OnListSelect(WPARAM wParam, LPARAM lParam);
  168. afx_msg LRESULT OnListEnd(WPARAM wParam, LPARAM lParam);
  169. afx_msg LRESULT OnSearch(WPARAM wParam, LPARAM lParam);
  170. afx_msg LRESULT OnDelete(WPARAM wParam, LPARAM lParam);
  171. afx_msg LRESULT OnProperties(WPARAM wParam, LPARAM lParam);
  172. afx_msg void OnGetToolTipText(NMHDR* pNMHDR, LRESULT* pResult);
  173. afx_msg LRESULT OnListSelect_DB_ID(WPARAM wParam, LPARAM lParam);
  174. afx_msg LRESULT OnListSelect_Index(WPARAM wParam, LPARAM lParam);
  175. afx_msg LRESULT OnRefreshView(WPARAM wParam, LPARAM lParam);
  176. afx_msg LRESULT OnGroupTreeMessage(WPARAM wParam, LPARAM lParam);
  177. DECLARE_MESSAGE_MAP()
  178. public:
  179. afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
  180. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  181. afx_msg void OnViewcaptionbaronRight();
  182. afx_msg void OnViewcaptionbaronBottom();
  183. afx_msg void OnViewcaptionbaronLeft();
  184. afx_msg void OnViewcaptionbaronTop();
  185. afx_msg void OnMenuAutohide();
  186. afx_msg void OnMenuViewfulldescription();
  187. afx_msg void OnMenuAllwaysontop();
  188. afx_msg void OnSortAscending();
  189. afx_msg void OnSortDescending();
  190. afx_msg void OnMenuNewGroup();
  191. afx_msg void OnMenuNewGroupSelection();
  192. afx_msg void OnBackButton();
  193. afx_msg LRESULT OnGetClipData(WPARAM wParam, LPARAM lParam);
  194. afx_msg LRESULT OnUpDown(WPARAM wParam, LPARAM lParam);
  195. LRESULT OnToolTipWndInactive(WPARAM wParam, LPARAM lParam);
  196. };
  197. /////////////////////////////////////////////////////////////////////////////
  198. //{{AFX_INSERT_LOCATION}}
  199. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  200. #endif // !defined(AFX_QPASTEWND_H__65261F0F_FEFD_48CF_A0CD_01D8BFEB353B__INCLUDED_)