【VC开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VC开源代码-EditLimit.cpp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
// EditLimit.cpp : implementation file
//
#include "stdafx.h"
#include "Login.h"
#include "EditLimit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEditLimit
CEditLimit::CEditLimit()
{
}
CEditLimit::~CEditLimit()
{
}
BEGIN_MESSAGE_MAP(CEditLimit, CEdit)
//{{AFX_MSG_MAP(CEditLimit)
ON_WM_CHAR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEditLimit message handlers
void CEditLimit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
//8为回格键(Back Space)
//65到90之间为大写字母
//97到122之间为小写字母
//48到57之间为数字
if (!((nChar == 8)
|| ((nChar >= 65) && (nChar <=90))
|| ((nChar >= 97) && (nChar <= 122))
|| ((nChar >= 48) && (nChar <= 57))))
{
return;
}
CEdit::OnChar(nChar, nRepCnt, nFlags);
}
上一篇:
EditGridDemoDlg.cpp
下一篇:
贪心算法论文终稿