NumberEdit.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #if !defined(AFX_NUMBEREDIT_H__C68189CB_8445_4009_8F29_34645AEBD9C5__INCLUDED_)
  2. #define AFX_NUMBEREDIT_H__C68189CB_8445_4009_8F29_34645AEBD9C5__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // NumberEdit.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CNumberEdit window
  10. class CNumberEdit : public CEdit
  11. {
  12. // Construction
  13. public:
  14. CNumberEdit();
  15. // Attributes
  16. public:
  17. // Operations
  18. public:
  19. // Overrides
  20. // ClassWizard generated virtual function overrides
  21. //{{AFX_VIRTUAL(CNumberEdit)
  22. //}}AFX_VIRTUAL
  23. public:
  24. double GetNumberD();
  25. long GetNumber();
  26. BOOL SetNumber(long lNumber);
  27. void SetMaxNumber(long lMax) { m_dMax = lMax; }
  28. long GetMaxNumber() { return (long)m_dMax; }
  29. protected:
  30. BOOL ValidateNumber(double dNumber);
  31. double m_dMax;
  32. // Implementation
  33. public:
  34. virtual ~CNumberEdit();
  35. // Generated message map functions
  36. protected:
  37. //{{AFX_MSG(CNumberEdit)
  38. afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  39. //}}AFX_MSG
  40. DECLARE_MESSAGE_MAP()
  41. };
  42. /////////////////////////////////////////////////////////////////////////////
  43. //{{AFX_INSERT_LOCATION}}
  44. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  45. #endif // !defined(AFX_NUMBEREDIT_H__C68189CB_8445_4009_8F29_34645AEBD9C5__INCLUDED_)