myeditctrl.cpp

来自「该源代码实现了局域网内的信息传递、文件传输」· C++ 代码 · 共 64 行

CPP
64
字号
// MyEditCtrl.cpp : implementation file
//

#include "stdafx.h"
#include "BQQ.h"
#include "MyEditCtrl.h"
#include "bqqdlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyEditCtrl

CMyEditCtrl::CMyEditCtrl()
{
}

CMyEditCtrl::~CMyEditCtrl()
{
}


BEGIN_MESSAGE_MAP(CMyEditCtrl, CEdit)
	//{{AFX_MSG_MAP(CMyEditCtrl)
	ON_CONTROL_REFLECT(EN_CHANGE, OnChange)
	ON_WM_CHAR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyEditCtrl message handlers

void CMyEditCtrl::OnChange() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CEdit::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.


	// TODO: Add your control notification handler code here
	
}



void CMyEditCtrl::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
		if(this->GetStyle() == ES_READONLY )
	{
		this->SetReadOnly(FALSE);
		this->SetWindowText("");
	}
	CEdit::OnChar(nChar, nRepCnt, nFlags);
	
}


⌨️ 快捷键说明

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