⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brentsplashex.cpp

📁 一个mapxmobile+gps的小程序,需要先安装mapx mobile
💻 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 + -