ShopNameStatic.cpp
1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#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;
//}