提交 | 用户 | age
|
61deef
|
1 |
|
Q |
2 |
// ChildView.cpp: CChildView 类的实现
|
|
3 |
//
|
|
4 |
|
|
5 |
#include "pch.h"
|
|
6 |
#include "framework.h"
|
|
7 |
#include "MFCApplication1.h"
|
|
8 |
#include "ChildView.h"
|
|
9 |
|
|
10 |
#ifdef _DEBUG
|
|
11 |
#define new DEBUG_NEW
|
|
12 |
#endif
|
|
13 |
|
|
14 |
|
|
15 |
// CChildView
|
|
16 |
|
|
17 |
CChildView::CChildView()
|
|
18 |
{
|
|
19 |
}
|
|
20 |
|
|
21 |
CChildView::~CChildView()
|
|
22 |
{
|
|
23 |
}
|
|
24 |
|
|
25 |
|
|
26 |
BEGIN_MESSAGE_MAP(CChildView, CWnd)
|
|
27 |
ON_WM_PAINT()
|
|
28 |
END_MESSAGE_MAP()
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
// CChildView 消息处理程序
|
|
33 |
|
|
34 |
BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
|
|
35 |
{
|
|
36 |
if (!CWnd::PreCreateWindow(cs))
|
|
37 |
return FALSE;
|
|
38 |
|
|
39 |
cs.dwExStyle |= WS_EX_CLIENTEDGE;
|
|
40 |
cs.style &= ~WS_BORDER;
|
|
41 |
cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
|
|
42 |
::LoadCursor(nullptr, IDC_ARROW), reinterpret_cast<HBRUSH>(COLOR_WINDOW+1), nullptr);
|
|
43 |
|
|
44 |
return TRUE;
|
|
45 |
}
|
|
46 |
|
|
47 |
void CChildView::OnPaint()
|
|
48 |
{
|
|
49 |
CPaintDC dc(this); // 用于绘制的设备上下文
|
|
50 |
|
|
51 |
// TODO: 在此处添加消息处理程序代码
|
|
52 |
|
|
53 |
// 不要为绘制消息而调用 CWnd::OnPaint()
|
|
54 |
}
|
|
55 |
|