QuickPasteKeyboard.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. }
  30. KeyboardAB Array[10];
  31. };
  32. // Dialog Data
  33. enum { IDD = IDD_OPTIONS_QUICK_PASTE_KEYBOARD };
  34. protected:
  35. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  36. DECLARE_MESSAGE_MAP()
  37. public:
  38. CListCtrl m_list;
  39. virtual BOOL OnInitDialog();
  40. protected:
  41. void InitListCtrlCols();
  42. void LoadItems();
  43. CString GetShortCutText(KeyboardArray ab);
  44. CString GetShortCutText(KeyboardAB ab);
  45. std::map<DWORD, KeyboardArray> m_map;
  46. void LoadHotKey(KeyboardAB ab);
  47. CString m_csTitle;
  48. int SelectedCommandId();
  49. int SelectedCommandShortCutId();
  50. int SelectedCommandRow();
  51. void SelectMouseTypeCombo(CComboBox &combo, int value);
  52. void SelectedRow(int row);
  53. public:
  54. afx_msg void OnLvnItemActivateList1(NMHDR *pNMHDR, LRESULT *pResult);
  55. afx_msg void OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult);
  56. CHotKeyCtrl m_hotKey1;
  57. afx_msg void OnBnClickedAssign();
  58. CHotKeyCtrl m_hotKey2;
  59. virtual BOOL OnApply();
  60. CComboBox m_assignedCombo;
  61. afx_msg void OnCbnSelchangeComboAllAssigned();
  62. afx_msg void OnBnClickedButtonRemove();
  63. afx_msg void OnBnClickedButtonAdd();
  64. afx_msg void OnCbnKillfocusComboEnterModifyer();
  65. afx_msg void OnEnKillfocusEdit1();
  66. afx_msg void OnKillFocus(CWnd* pNewWnd);
  67. virtual BOOL PreTranslateMessage(MSG* pMsg);
  68. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  69. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  70. afx_msg void OnBnClickedButtonEnter();
  71. afx_msg void OnBnClickedButtonEnter2();
  72. afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
  73. CComboBox m_mouseType1;
  74. CComboBox m_mouseType2;
  75. afx_msg void OnBnClickedButtonReset();
  76. afx_msg void OnBnClickedRadioKeyboard1();
  77. afx_msg void OnBnClickedRadioMouse1();
  78. afx_msg void OnBnClickedRadioKeyboard2();
  79. afx_msg void OnBnClickedRadioMouse2();
  80. afx_msg void OnBnClickedCheckEnableSecondPress();
  81. };