editlimit.cpp

来自「登陆界面加上加密解密文件」· C++ 代码 · 共 53 行

CPP
53
字号
// 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);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?