splashwindow.cpp

来自「c++学生成绩管理系统,功能比较完善的中级管理系统」· C++ 代码 · 共 75 行

CPP
75
字号
// SplashWindow.cpp : implementation file
//

#include "stdafx.h"
#include "SplashWindow.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSplashWindow

CSplashWindow::CSplashWindow()
{
	m_bBitmap.LoadBitmap(MAKEINTRESOURCE(149));
}

CSplashWindow::~CSplashWindow()
{
}


BEGIN_MESSAGE_MAP(CSplashWindow, CWnd)
	//{{AFX_MSG_MAP(CSplashWindow)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CSplashWindow message handlers

void CSplashWindow::CreateSplash()
{
	CreateEx(0,
		     AfxRegisterWndClass(
			 0,
			 AfxGetApp()->LoadStandardCursor(IDC_UPARROW)),
			 "SplashWindow Sample",
			 WS_POPUP,
			 0,
			 0,
			 400,
             300, 
			 NULL,
			 NULL,
			 NULL);
}

void CSplashWindow::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here

  MemDC.CreateCompatibleDC(NULL); 
  MemDC.SelectObject(&m_bBitmap);
  dc.StretchBlt(0,
                0,
                398,
                198, 
                &MemDC, 
                0,
                0,
                398, 
                198,
                SRCCOPY);
  dc.Draw3dRect(0,0,398,198,RGB(0,0,0),RGB(0,0,0));
  
	// Do not call CWnd::OnPaint() for painting messages
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?