📄 brentsplashex.cpp
字号:
// AntSplash.cpp
#include "stdafx.h"
#include "BrentSplashEx.h"
#include "..\resource.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(CSplashWindow, CWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
CSplashWindow::CSplashWindow()
{
m_Bitmap.LoadBitmap(MAKEINTRESOURCE(IDB_BITMAP_LOGO));
m_Bitmap.GetBitmap(&bmBitmap);
}
CSplashWindow::~CSplashWindow()
{
}
void CSplashWindow::CreateSplash(LPCTSTR szApp_Staring)
{
CreateEx(0,
AfxRegisterWndClass(
0,
AfxGetApp()->LoadStandardCursor(IDC_UPARROW)),
szApp_Staring,
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);
Old_Bitmap = memDC.SelectObject(&m_Bitmap);
dc.StretchBlt(0,
0,
bmBitmap.bmWidth,
bmBitmap.bmHeight,
&memDC,
0,
0,
bmBitmap.bmWidth,
bmBitmap.bmHeight,
SRCCOPY);
memDC.SelectObject(Old_Bitmap);
memDC.DeleteDC();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -