ShopNameStatic.cpp 1.28 KB
#include "stdafx.h"
#include "ShopNameStatic.h"

IMPLEMENT_DYNAMIC(CShopNameStatic, CStatic)

CShopNameStatic::CShopNameStatic()
{
}


CShopNameStatic::~CShopNameStatic()
{
}
BEGIN_MESSAGE_MAP(CShopNameStatic, CStatic)
	ON_WM_PAINT()
	ON_WM_SIZE()
	ON_WM_CTLCOLOR()
END_MESSAGE_MAP()


//void CShopNameStatic::OnPaint()
//{
//	CPaintDC dc(this); // device context for painting
//	
//	COLORREF dwColor = dc.GetBkColor();
//
//	CRect rtClient;
//	GetClientRect(&rtClient);
//
//	CFont fontStatic;
//	fontStatic.CreatePointFont(100, L"微软雅黑");
//
//	dc.SelectObject(&fontStatic);
//
//	//dc.FillSolidRect(rtClient, dwColor);
//	
//	dc.FillSolidRect(rtClient, GetSysColor(COLOR_3DFACE));
//
//	CString sText;
//	GetWindowText(sText);
//	dc.DrawText(sText, rtClient, DT_SINGLELINE | DT_LEFT | DT_VCENTER);
//	
//	__super::OnPaint();
//}







//void CShopNameStatic::OnSize(UINT nType, int cx, int cy)
//{
//	CStatic::OnSize(nType, cx, cy);
//
//	// TODO:  在此处添加消息处理程序代码
//}

//
//HBRUSH CShopNameStatic::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
//{
//	HBRUSH hbr = CStatic::OnCtlColor(pDC, pWnd, nCtlColor);
//
//	if (pWnd->GetDlgCtrlID() == m_)
//	pDC->SetTextColor(RGB(255, 0, 0));        //设置字体颜色
//	pDC->SetBkMode(TRANSPARENT);         //设置字体背景为透明
//
//	return hbr;
//}