-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtendedComboBox.h
More file actions
98 lines (77 loc) · 2.33 KB
/
Copy pathExtendedComboBox.h
File metadata and controls
98 lines (77 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// ExtendedComboBox.h : header file
//
#include "ExtendedEdit.h"
class CExtendedComboBox;
/////////////////////////////////////////////////////////////////////////////
// CListBoxInsideComboBox window
class CListBoxInsideComboBox : public CWnd
{
// Construction
public:
CListBoxInsideComboBox();
// Attributes
public:
CExtendedComboBox *m_Parent;
void SetParent(CExtendedComboBox *);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CListBoxInsideComboBox)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CListBoxInsideComboBox();
// Generated message map functions
protected:
//{{AFX_MSG(CListBoxInsideComboBox)
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CExtendedComboBox window
class CExtendedComboBox : public CComboBox
{
// Construction
public:
CExtendedComboBox();
// Attributes
public:
// default implementation uses LSB of item data; override to get other behaviour
virtual BOOL IsItemEnabled(UINT) const;
void SetItemEnabled(UINT nIndex, BOOL enabled);
void SetInputLimit(BOOL limited, std::vector<const char*> patterns, std::vector<const char*> reservpatterns);
protected:
CString m_strSavedText; // saves text between OnSelendok and OnRealSelEndOK calls
CListBoxInsideComboBox m_ListBox;
CExtendedEdit m_Edit;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CExtendedComboBox)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
protected:
virtual void PreSubclassWindow();
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
private:
// Implementation
public:
virtual ~CExtendedComboBox();
// Generated message map functions
protected:
//{{AFX_MSG(CExtendedComboBox)
afx_msg int OnCharToItem(UINT nChar, CListBox* pListBox, UINT nIndex);
afx_msg void OnSelendok();
//}}AFX_MSG
LRESULT OnCtlColorListBox(WPARAM,LPARAM lParam);
LRESULT OnCtlColorEdit(WPARAM, LPARAM lParam);
afx_msg LRESULT OnRealSelEndOK(WPARAM,LPARAM);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////