ComboListCtrl5.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. #if !defined(AFX_ComboBoxLISTCTRL5_H__B26FE6EC_7377_4DA6_BEC1_E3C656DACFB8__INCLUDED_)
  2. #define AFX_ComboBoxLISTCTRL5_H__B26FE6EC_7377_4DA6_BEC1_E3C656DACFB8__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ComboBoxListCtrl.h : header file
  7. //
  8. #define WM_USER_ComboBox_END WM_USER+1001
  9. #include "TreeComboBox2.h"
  10. class CListCtrlComboBox5 : public CComboBox
  11. {
  12. // Construction
  13. public:
  14. CListCtrlComboBox5();
  15. // Attributes
  16. public:
  17. void SetCtrlData(DWORD dwData);
  18. DWORD GetCtrlData();
  19. // Operations
  20. public:
  21. // Overrides
  22. // ClassWizard generated virtual function overrides
  23. //{{AFX_VIRTUAL(CListCtrlComboBox5)
  24. public:
  25. virtual BOOL PreTranslateMessage(MSG* pMsg);
  26. //}}AFX_VIRTUAL
  27. // Implementation
  28. public:
  29. virtual ~CListCtrlComboBox5();
  30. // Generated message map functions
  31. protected:
  32. //{{AFX_MSG(CListCtrlComboBox5)
  33. afx_msg void OnKillFocus(CWnd* pNewWnd);
  34. afx_msg void OnSetFocus(CWnd* pOldWnd);
  35. afx_msg void OnCloseup();
  36. //}}AFX_MSG
  37. DECLARE_MESSAGE_MAP()
  38. private:
  39. DWORD m_dwData;
  40. BOOL m_bExchange;
  41. };
  42. class CMyDateTimeCtrl : public CDateTimeCtrl
  43. {
  44. // Construction
  45. public:
  46. CMyDateTimeCtrl();
  47. // Attributes
  48. public:
  49. // Operations
  50. public:
  51. // Overrides
  52. // ClassWizard generated virtual function overrides
  53. //{{AFX_VIRTUAL(CMyDateTimeCtrl)
  54. public:
  55. virtual BOOL PreTranslateMessage(MSG* pMsg);
  56. //}}AFX_VIRTUAL
  57. // Implementation
  58. public:
  59. virtual ~CMyDateTimeCtrl();
  60. // Generated message map functions
  61. protected:
  62. //{{AFX_MSG(CMyDateTimeCtrl)
  63. afx_msg void OnKillFocus(CWnd* pNewWnd);
  64. afx_msg void OnSetFocus(CWnd* pOldWnd);
  65. afx_msg void OnCloseup();
  66. //}}AFX_MSG
  67. DECLARE_MESSAGE_MAP()
  68. };
  69. /////////////////////////////////////////////////////////////////////////////
  70. //////////////////////////////////////////////////////////////////////////
  71. //////////////////////////////////////////////////////////////////////////
  72. //////////////////////////////////////////////////////////////////////////
  73. //////////////////////////////////////////////////////////////////////////
  74. //////////////////////////////////////////////////////////////////////////
  75. class CComboBoxListCtrl5 : public CListCtrl
  76. {
  77. CSortHeaderCtrl2 m_ctlHeader;
  78. // Construction
  79. public:
  80. CComboBoxListCtrl5();
  81. // Attributes
  82. public:
  83. CArray<CStringArray, CStringArray>*m_sparray;
  84. // CListCtrlComboBox5 m_ComboBox;
  85. CTreeComboBox2 *m_pComboBox;
  86. // Operations
  87. public:
  88. // Overrides
  89. // ClassWizard generated virtual function overrides
  90. //{{AFX_VIRTUAL(CComboBoxListCtrl5)
  91. public:
  92. virtual BOOL PreTranslateMessage(MSG* pMsg);
  93. virtual void PreSubclassWindow();
  94. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  95. //}}AFX_VIRTUAL
  96. // Implementation
  97. public:
  98. void InitStyle();
  99. virtual ~CComboBoxListCtrl5();
  100. // Generated message map functions
  101. protected:
  102. //{{AFX_MSG(CComboBoxListCtrl5)
  103. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  104. afx_msg void OnParentNotify(UINT message, LPARAM lParam);
  105. afx_msg void OnCustomdrawList(NMHDR*, LRESULT*);
  106. //}}AFX_MSG
  107. #ifdef VC60
  108. afx_msg void OnComboBoxEnd(WPARAM ,LPARAM lParam = FALSE);
  109. #else
  110. afx_msg LRESULT OnComboBoxEnd(WPARAM ,LPARAM lParam = FALSE);
  111. #endif
  112. DECLARE_MESSAGE_MAP()
  113. private:
  114. void ShowComboBox(BOOL bShow,int nItem,int nIndex,CRect rc = CRect(0,0,0,0));
  115. void ShowDateCtrl(BOOL bShow,int nItem,int nIndex,CRect rc = CRect(0,0,0,0));
  116. CMyDateTimeCtrl m_DateCtrl;
  117. int m_nItem;
  118. int m_nSub;
  119. BOOL Key_Shift(int& nItem,int& nSub);
  120. BOOL Key_Ctrl(int& nItem,int &nSub);
  121. };
  122. //////////////////////////////////////////////////////////////////////////
  123. //////////////////////////////////////////////////////////////////////////
  124. //////////////////////////////////////////////////////////////////////////
  125. //////////////////////////////////////////////////////////////////////////
  126. /////////////////////////////////////////////////////////////////////////////
  127. //{{AFX_INSERT_LOCATION}}
  128. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  129. #endif // !defined(AFX_ComboBoxLISTCTRL5_H__B26FE6EC_7377_4DA6_BEC1_E3C656DACFB8__INCLUDED_)