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

📄 demo_myedit.cpp

📁 使用yacc的一个例子
💻 CPP
字号:
// Demo_MyEdit.cpp : implementation file
//

#include "stdafx.h"
#include "sdbmsdemo.h"
#include "Demo_MyEdit.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDemo_MyEdit

CDemo_MyEdit::CDemo_MyEdit()
{
	m_brush.CreateSolidBrush(RGB(255,255,255));	//白色刷子
}

CDemo_MyEdit::~CDemo_MyEdit()
{
}


BEGIN_MESSAGE_MAP(CDemo_MyEdit, CEdit)
	//{{AFX_MSG_MAP(CDemo_MyEdit)
	ON_WM_CTLCOLOR_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDemo_MyEdit message handlers

HBRUSH CDemo_MyEdit::CtlColor(CDC* pDC, UINT nCtlColor) 
{
	// TODO: Change any attributes of the DC here
	
	// TODO: Return a non-NULL brush if the parent's handler should not be called
	return (HBRUSH)m_brush.GetSafeHandle();
//	return NULL;
}


BOOL CDemo_MyEdit::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	if	(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE)
	{
		return TRUE;	//如果不屏蔽到Escape键,会有错误。不知何故,可能是CJLibrary的问题
	}

	return CEdit::PreTranslateMessage(pMsg);
}

⌨️ 快捷键说明

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