PhoneEdit.cpp
上传用户:hahaxixi
上传日期:2022-04-15
资源大小:1939k
文件大小:1k
源码类别:

手机短信编程

开发平台:

Visual C++

  1. // PhoneEdit.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "NoteManage.h"
  5. #include "PhoneEdit.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CPhoneEdit
  13. CPhoneEdit::CPhoneEdit()
  14. {
  15. }
  16. CPhoneEdit::~CPhoneEdit()
  17. {
  18. }
  19. BEGIN_MESSAGE_MAP(CPhoneEdit, CEdit)
  20. //{{AFX_MSG_MAP(CPhoneEdit)
  21. ON_WM_CHAR()
  22. //}}AFX_MSG_MAP
  23. END_MESSAGE_MAP()
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CPhoneEdit message handlers
  26. void CPhoneEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
  27. {
  28. // TODO: Add your message handler code here and/or call default
  29. if(nChar==8) //退格键
  30. {
  31. CEdit::OnChar(nChar, nRepCnt, nFlags);
  32. return;
  33. }
  34. if((nChar<48 || nChar>57)) //只允许输入数字
  35. nChar = 0;
  36. else
  37. CEdit::OnChar(nChar, nRepCnt, nFlags);
  38. }