etrade_edit_control.h
847 Bytes
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
#ifndef __my_edit_control_h__
#define __my_edit_control_h__
enum CheckType
{
CardNumType = 0,
CommNumType,
UnitType,
HeavyType,
PriceType,
CountType,
DoNotCheck
};
class CEditBox : public CEdit
{
DECLARE_DYNAMIC(CEditBox)
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);
bool IsEditRed();
bool is_edit_red_;
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);
};
#endif // __my_edit_control_h__