NumberEdit.h
#ifndef __NUMBEREDIT_H__
#define __NUMBEREDIT_H__
class CNumberEdit : public CEdit
{
public:
CNumberEdit();
virtual ~CNumberEdit();
void SetAfterDotLen(UINT iAfterDotLen){m_iAfterDotLen =iAfterDotLen;}
UINT GetAfterDotLen(){return m_iAfterDotLen;}
protected:
BOOL CheckNumber(UINT nChar,UINT nRepCnt,UINT nFlags);
//BOOL CheckOnePlus(UINT nChar,UINT nRepCnt,UINT nFlags);
BOOL CheckOneMinus(UINT nChar,UINT nRepCnt,UINT nFlags);
BOOL CheckOneDot(UINT nChar,UINT nRepCnt,UINT nFlags);
int GetCaretXPos();
CString m_str;
UINT m_iAfterDotLen;
protected:
//{ {AFX_MSG(CUntcNumberEdit)
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKillfocus();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()