forked from leixiaohua1020/VideoEye
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Welcome.cpp
71 lines (57 loc) · 1.46 KB
/
Welcome.cpp
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
70
/*
*
*
* VideoEye
*
* 雷霄骅 Lei Xiaohua
* leixiaohua1020@126.com
* 中国传媒大学/数字电视技术
* Communication University of China / Digital TV Technology
* http://blog.csdn.net/leixiaohua1020
*
*/
#include "stdafx.h"
#include "Welcome.h"
// Welcome
IMPLEMENT_DYNAMIC(Welcome, CWnd)
Welcome::Welcome()
{
}
Welcome::~Welcome()
{
}
BEGIN_MESSAGE_MAP(Welcome, CWnd)
ON_WM_PAINT()
ON_WM_TIMER()
END_MESSAGE_MAP()
// Welcome 消息处理程序
// Welcome 消息处理程序
void Welcome::Create(UINT nBitmapID)
{
m_bitmap.LoadBitmap(nBitmapID);
BITMAP bitmap;
m_bitmap.GetBitmap(&bitmap);
//CreateEx(0,AfxRegisterWndClass(0),"",WS_POPUP|WS_VISIBLE|WS_BORDER,0,0,bitmap.bmWidth,bitmap.bmHeight,NULL,0);
CreateEx(0,
AfxRegisterWndClass(0, AfxGetApp()->LoadStandardCursor(IDC_ARROW)),
NULL, WS_POPUP | WS_VISIBLE, 0, 0, bitmap.bmWidth, bitmap.bmHeight, NULL , NULL);
}
void Welcome::OnPaint()
{
// TODO: 在此处添加消息处理程序代码
// 不为绘图消息调用 CWnd::OnPaint()
CPaintDC dc(this); // device context forpainting
BITMAP bitmap;
m_bitmap.GetBitmap(&bitmap);
CDC dcComp;
dcComp.CreateCompatibleDC(&dc);
dcComp.SelectObject(&m_bitmap);
// draw bitmap
dc.BitBlt(0,0,bitmap.bmWidth,bitmap.bmHeight,&dcComp,0,0,SRCCOPY);
}
void Welcome::OnTimer(UINT_PTR nIDEvent)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
//CWnd::OnTimer(nIDEvent);
DestroyWindow(); //销毁初始画面窗口
}