📄 splashwnd.cpp
字号:
// SplashWnd.cpp : implementation file
//
#include "stdafx.h"
#include "RyxGps.h"
#include "SplashWnd.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSplashWnd
CSplashWnd::CSplashWnd()
{
}
CSplashWnd::~CSplashWnd()
{
}
BEGIN_MESSAGE_MAP(CSplashWnd, CWnd)
//{{AFX_MSG_MAP(CSplashWnd)
ON_WM_CREATE()
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSplashWnd message handlers
int CSplashWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
m_CBitmap.LoadBitmap(IDB_BITMAP1);
m_CBitmap.GetObject(sizeof(BITMAP),&m_bitmap);
return 0;
}
BOOL CSplashWnd::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
if(!CWnd::PreCreateWindow(cs))
return FALSE;
cs.style=WS_POPUP;
return TRUE;
}
void CSplashWnd::OnPaint()
{
CPaintDC dc(this);
CDC dcMem;
CBitmap *pBmp;
CFont font;
font.CreatePointFont(150,_T("Times New Roman"));
dcMem.CreateCompatibleDC(&dc);
pBmp=(CBitmap *)dcMem.SelectObject(&m_CBitmap);
dc.BitBlt(0,0,m_bitmap.bmWidth,m_bitmap.bmHeight,&dcMem,0,0,SRCCOPY);
dc.SelectObject(&font);
dc.SetBkMode(TRANSPARENT);
dc.SetTextColor(RGB(255,255,0));
dc.TextOut(50,m_bitmap.bmHeight-60,CString("初始化..."));
dcMem.SelectObject(pBmp);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -