olorlabel.cpp

来自「EVC实现LCD屏」· C++ 代码 · 共 45 行

CPP
45
字号
// olorLabel.cpp : implementation file
//

#include "stdafx.h"
#include "LCDSample.h"
#include "olorLabel.h"

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

/////////////////////////////////////////////////////////////////////////////
// ColorLabel

ColorLabel::ColorLabel()
{
	m_crColor = RGB(0, 0, 0);

	m_hBrush = ::CreateSolidBrush(m_crColor);
}

ColorLabel::~ColorLabel()
{
	::DeleteObject(m_hBrush);
}


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

/////////////////////////////////////////////////////////////////////////////
// ColorLabel message handlers
HBRUSH ColorLabel::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 m_hBrush;
}

⌨️ 快捷键说明

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