?? sninputedit.cpp
字號(hào):
// sninputedit.cpp : implementation file
//
#include "stdafx.h"
#include "SeriesPort.h"
#include "sninputedit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// sninputedit
sninputedit::sninputedit()
{
}
sninputedit::~sninputedit()
{
}
BEGIN_MESSAGE_MAP(sninputedit, CEdit)
//{{AFX_MSG_MAP(sninputedit)
ON_WM_CHAR()
ON_WM_KEYDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// sninputedit message handlers
void sninputedit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
CString str;
GetWindowText(str);
if(nChar==8)
{ CEdit::OnChar(nChar,nRepCnt,nFlags);
return ;}
if(str.GetLength()>=8)
nChar=0;
if((nChar<48||nChar>57)&&(nChar<65||nChar>70)&&(nChar<97||nChar>102))
nChar=0;
else CEdit::OnChar(nChar, nRepCnt, nFlags);
}
void sninputedit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -