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

📄 coolstatic.cpp

📁 Resource editor base speadrum Chinese mobile
💻 CPP
字号:
// CoolStatic.cpp : implementation file
//

#include "stdafx.h"
#include "CoolStatic.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCoolStatic

CCoolStatic::CCoolStatic()
{
}

CCoolStatic::~CCoolStatic()
{
}


BEGIN_MESSAGE_MAP(CCoolStatic, CStatic)
	//{{AFX_MSG_MAP(CCoolStatic)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCoolStatic message handlers

void CCoolStatic::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	CRect rect;
	GetClientRect(&rect);
	CBrush brush;
	brush.CreateSolidBrush(m_nColor);
	dc.FillRect(&rect,&brush);
	// Do not call CStatic::OnPaint() for painting messages
}
void CCoolStatic::SetColor(UINT rgb)
{
	_ASSERT(rgb>=0);
	m_nColor = rgb;
}

⌨️ 快捷键说明

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