edithex.cpp

来自「vc 485串口通讯测试程序 vc-commtest」· C++ 代码 · 共 44 行

CPP
44
字号
// EditHex.cpp : implementation file
//

#include "stdafx.h"
#include "EditHex.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEditHex

CEditHex::CEditHex()
{
}

CEditHex::~CEditHex()
{
}


BEGIN_MESSAGE_MAP(CEditHex, CEdit)
	//{{AFX_MSG_MAP(CEditHex)
	ON_WM_CHAR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEditHex message handlers

void CEditHex::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	if(nChar != ' ')
	{
		if(isprint( nChar))
			if(!isxdigit( nChar )) return;
	}
	CEdit::OnChar(nChar, nRepCnt, nFlags);
}

⌨️ 快捷键说明

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