📄 rededit.cpp
字号:
// RedEdit.cpp : implementation file
//
#include "stdafx.h"
#include "Chapter06.h"
#include "RedEdit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRedEdit
CRedEdit::CRedEdit()
{
m_ctrlText=RGB(0,255,0);
m_ctrlBk=RGB(255,0,0);
m_brBk.CreateSolidBrush(m_ctrlBk);
}
CRedEdit::~CRedEdit()
{
}
BEGIN_MESSAGE_MAP(CRedEdit, CEdit)
//{{AFX_MSG_MAP(CRedEdit)
ON_WM_CTLCOLOR_REFLECT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRedEdit message handlers
HBRUSH CRedEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
pDC->SetTextColor(m_ctrlText);
pDC->SetBkColor(m_ctrlBk);
return m_brBk;
// TODO: Return a non-NULL brush if the parent's handler should not be called
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -