📄 splashwindow.cpp
字号:
#include<stdafx.h>
#include<mmsystem.h>
#include"SplashWindow.h"
#include"resource.h"
BEGIN_MESSAGE_MAP(CSplashWindow, CWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
CSplashWindow::CSplashWindow()
{
m_Bitmap.LoadBitmap(MAKEINTRESOURCE(IDB_FlashPic)); //Load Bitmap
m_Bitmap.GetBitmap(&bmBitmap); //Get Bitmap Info
/*Show Splash Window and Play SplashWindow.wav*/
// ::PlaySound("SplashWindow.wav", NULL, SND_ASYNC | SND_FILENAME);
}
CSplashWindow::~CSplashWindow()
{
}
void CSplashWindow::CreateSplash()
{
//Create Splash Window
CreateEx(0,
AfxRegisterWndClass(
0,
AfxGetApp()->LoadStandardCursor(IDC_UPARROW)),
(LPCTSTR)"SplashWindow",
WS_POPUP,
0,
0,
bmBitmap.bmWidth, //Bitmap Width = Splash Window Width
bmBitmap.bmHeight, //Bitmap Height = Splash Window Height
NULL,
NULL,
NULL);
}
void CSplashWindow::OnPaint()
{
CPaintDC dc(this);
MemDC.CreateCompatibleDC(NULL); //Create Memory DC
Old_Bitmap = MemDC.SelectObject(&m_Bitmap); //Select DC
dc.StretchBlt(0,
0,
bmBitmap.bmWidth,
bmBitmap.bmHeight,
&MemDC,
0,
0,
bmBitmap.bmWidth,
bmBitmap.bmHeight,
SRCCOPY);
MemDC.SelectObject(Old_Bitmap); //Select Bitmap
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -