bitedit.cpp

来自「智能大厦报警系统:主要通过串口通信来实现。计算机对数模转换设备发送到端口的数据进」· C++ 代码 · 共 47 行

CPP
47
字号
// BitEdit.cpp : implementation file
//

#include "stdafx.h"
#include "yhjk.h"
#include "BitEdit.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBitEdit

CBitEdit::CBitEdit()
{
}

CBitEdit::~CBitEdit()
{
}


BEGIN_MESSAGE_MAP(CBitEdit, CEdit)
	//{{AFX_MSG_MAP(CBitEdit)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBitEdit message handlers

BOOL CBitEdit::PreTranslateMessage(MSG* pMsg) 
{
	if(pMsg->message==WM_KEYDOWN && (pMsg->wParam!=48 && pMsg->wParam!=49 && pMsg->wParam!=VK_NUMPAD0 && pMsg->wParam!=VK_NUMPAD1 && pMsg->wParam!=8 && pMsg->wParam!=13))
	{
		pMsg->wParam=VK_CONTROL;
	}
	else
		if(pMsg->message==WM_KEYDOWN && pMsg->wParam==13)
			pMsg->wParam=9;
	
	return CEdit::PreTranslateMessage(pMsg);
}

⌨️ 快捷键说明

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