title.cpp

来自「一个简单的个人所得税计算器,可以编辑税率表和所在地列表.」· C++ 代码 · 共 58 行

CPP
58
字号
// Title.cpp : implementation file
//

#include "stdafx.h"
#include "pitc.h"
#include "Title.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTitle

CTitle::CTitle()
{
}

CTitle::~CTitle()
{
}


BEGIN_MESSAGE_MAP(CTitle, CStatic)
	//{{AFX_MSG_MAP(CTitle)
	ON_WM_CTLCOLOR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTitle message handlers

HBRUSH CTitle::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CStatic::OnCtlColor(pDC, pWnd, nCtlColor);
	
	// TODO: Change any attributes of the DC here
	CRect rc;
	GetClientRect( &rc );

	//背景画刷
	CBrush Brush( COLOR_BTNFACE );	
	HBRUSH br = (HBRUSH)Brush.GetSafeHandle();
	pDC->FillRect( &rc, &Brush );

	//文字颜色
	pDC->SetTextColor( RGB(0,0,255) );
	pDC->SetBkMode( TRANSPARENT );
	
	Brush.Detach();
	return br;

	// TODO: Return a different brush if the default is not desired
	return hbr;
}

⌨️ 快捷键说明

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