liuye
authored
|
1
2
3
|
#ifndef __my_edit_control_h__
#define __my_edit_control_h__
|
liuye
authored
|
4
5
6
7
8
9
10
11
12
13
14
|
enum CheckType
{
CardNumType = 0,
CommNumType,
UnitType,
HeavyType,
PriceType,
CountType,
DoNotCheck
};
|
liuye
authored
|
15
16
|
class CEditBox : public CEdit
{
|
liuye
authored
|
17
|
DECLARE_DYNAMIC(CEditBox)
|
liuye
authored
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
public:
CEditBox();
~CEditBox();
private:
COLORREF m_clrFrame;
protected:
afx_msg void OnNcPaint();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnKillFocus(CWnd* pNewWnd);
public:
void SetEditRed(bool is_red);
|
liuye
authored
|
34
|
bool IsEditRed();
|
liuye
authored
|
35
36
|
bool is_edit_red_;
|
liuye
authored
|
37
38
39
40
41
42
43
44
45
46
47
48
|
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
void SetCheck(CheckType type);
CheckType check_type_;
bool CheckCardNum(CString num);
bool CheckCommNum(CString num);
bool CheckUnitNum(CString num);
bool CheckHeavy(CString heavy);
bool CheckPrice(CString price);
bool CheckCount(CString count);
|
liuye
authored
|
49
50
51
|
};
#endif // __my_edit_control_h__
|