⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myedit.cpp

📁 一款国产的8051模拟器(全部源代码) 本软件是一款8051模拟器
💻 CPP
字号:
// MyEdit.cpp : implementation file
//

#include "stdafx.h"

#include "MyEdit.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyEdit

CMyEdit::CMyEdit()
{
	
}

CMyEdit::~CMyEdit()
{
}


BEGIN_MESSAGE_MAP(CMyEdit, CEdit)
	//{{AFX_MSG_MAP(CMyEdit)
	ON_CONTROL_REFLECT(EN_MAXTEXT, OnMaxtext)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyEdit message handlers

BOOL CMyEdit::PreTranslateMessage(MSG* pMsg) 
{
	
	if(pMsg->message == WM_KEYDOWN)
    {
		//直接返回,则不响应键盘消息
		return TRUE;
        switch(pMsg->wParam)
        {
        case VK_RETURN://屏蔽回车
            return TRUE;
        case VK_ESCAPE://屏蔽Esc
            return TRUE;
        }
    }	// TODO: Add your specialized code here and/or call the base class
	
	return CEdit::PreTranslateMessage(pMsg);
}

void CMyEdit::OnMaxtext() 
{
	// TODO: Add your control notification handler code here
//	AfxMessageBox("");
	this->SetSel(0,-1,TRUE);
	this->Clear();
	
	
}

int CMyEdit::SetFontBystr(TCHAR *str)
{
	CFont font;
	font.CreateFont(0,0,0,0,FW_BOLD,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,str);
	this->SetFont(&font,TRUE);
	return 0;

}

⌨️ 快捷键说明

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