hexedit.cpp

来自「嵌入式DOS系统上位升级程序FileUpgrade, 需配合本人上传的FileU」· C++ 代码 · 共 52 行

CPP
52
字号
// HexEdit.cpp : implementation file
//

#include "stdafx.h"
#include "HexEdit.h"
#include "Public.h"

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

/////////////////////////////////////////////////////////////////////////////
// CHexEdit

CHexEdit::CHexEdit()
{
}

CHexEdit::~CHexEdit()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CHexEdit message handlers
void CHexEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if(isHexdigit(nChar)||(nChar==0x08)) CEdit::OnChar(nChar, nRepCnt, nFlags);
}

void CHexEdit::SubclassDlgItem(UINT nID, CWnd *pParent, int nChars/*=8*/)
{
	CEdit::SubclassDlgItem(nID,pParent);
	LimitText(nChars);

}
unsigned long int CHexEdit::GetValue()
{
	TCHAR text[15];
	this->GetWindowText(text,10);
	return HexStrToInt(text);

}

⌨️ 快捷键说明

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