QuickPasteKeyboard.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #pragma once
  2. #include "afxcmn.h"
  3. #include "afxwin.h"
  4. // CQuickPasteKeyboard dialog
  5. class CQuickPasteKeyboard : public CPropertyPage
  6. {
  7. DECLARE_DYNAMIC(CQuickPasteKeyboard)
  8. public:
  9. CQuickPasteKeyboard();
  10. virtual ~CQuickPasteKeyboard();
  11. class KeyboardAB
  12. {
  13. public:
  14. KeyboardAB()
  15. {
  16. A = -1;
  17. B = -1;
  18. Dirty = false;
  19. }
  20. int A;
  21. int B;
  22. bool Dirty;
  23. };
  24. class KeyboardArray
  25. {
  26. public:
  27. KeyboardArray()
  28. {
  29. m_refData = _T("");
  30. }
  31. CString m_refData;
  32. KeyboardAB Array[10];
  33. };
  34. // Dialog Data
  35. enum { IDD = IDD_OPTIONS_QUICK_PASTE_KEYBOARD };
  36. protected:
  37. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  38. DECLARE_MESSAGE_MAP()
  39. public:
  40. CListCtrl m_list;
  41. virtual BOOL OnInitDialog();
  42. protected:
  43. void InitListCtrlCols();
  44. void LoadItems();
  45. CString GetShortCutText(KeyboardArray ab);
  46. CString GetShortCutText(KeyboardAB ab);
  47. std::map<DWORD, KeyboardArray> m_map;
  48. void LoadHotKey(KeyboardAB ab);
  49. CString m_csTitle;
  50. int SelectedCommandId();
  51. int SelectedCommandShortCutId();
  52. int SelectedCommandRow();
  53. void SelectMouseTypeCombo(CComboBox &combo, int value);
  54. void SelectedRow(int row);
  55. public:
  56. afx_msg void OnLvnItemActivateList1(NMHDR *pNMHDR, LRESULT *pResult);
  57. afx_msg void OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult);
  58. CHotKeyCtrl m_hotKey1;
  59. afx_msg void OnBnClickedAssign();
  60. CHotKeyCtrl m_hotKey2;
  61. virtual BOOL OnApply();
  62. CComboBox m_assignedCombo;
  63. afx_msg void OnCbnSelchangeComboAllAssigned();
  64. afx_msg void OnBnClickedButtonRemove();
  65. afx_msg void OnBnClickedButtonAdd();
  66. afx_msg void OnCbnKillfocusComboEnterModifyer();
  67. afx_msg void OnEnKillfocusEdit1();
  68. afx_msg void OnKillFocus(CWnd* pNewWnd);
  69. virtual BOOL PreTranslateMessage(MSG* pMsg);
  70. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  71. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  72. afx_msg void OnBnClickedButtonEnter();
  73. afx_msg void OnBnClickedButtonEnter2();
  74. afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
  75. CComboBox m_mouseType1;
  76. CComboBox m_mouseType2;
  77. afx_msg void OnBnClickedButtonReset();
  78. afx_msg void OnBnClickedRadioKeyboard1();
  79. afx_msg void OnBnClickedRadioMouse1();
  80. afx_msg void OnBnClickedRadioKeyboard2();
  81. afx_msg void OnBnClickedRadioMouse2();
  82. afx_msg void OnBnClickedCheckEnableSecondPress();
  83. };