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

📄 myview2.cpp

📁 DMC VC++ 的程序  给大学生毕业用 啦 其它不多说了 用了就知道!
💻 CPP
字号:
// MyView2.cpp : implementation file
//

#include "stdafx.h"
#include "DMC.h"
#include "MyView2.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyView2

IMPLEMENT_DYNCREATE(CMyView2, CView)

CMyView2::CMyView2()
{
}

CMyView2::~CMyView2()
{
}


BEGIN_MESSAGE_MAP(CMyView2, CView)
	//{{AFX_MSG_MAP(CMyView2)
	ON_WM_ERASEBKGND()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyView2 drawing

void CMyView2::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CMyView2 diagnostics

#ifdef _DEBUG
void CMyView2::AssertValid() const
{
	CView::AssertValid();
}

void CMyView2::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMyView2 message handlers

BOOL CMyView2::OnEraseBkgnd(CDC* pDC) 
{
	CBitmap bitmap;
	bitmap.LoadBitmap(IDB_BITMAP1);

	BITMAP bmp;
	bitmap.GetBitmap(&bmp);

	CDC dcCompatible;
	dcCompatible.CreateCompatibleDC(pDC);

	dcCompatible.SelectObject(&bitmap);

	CRect rect;
	GetClientRect(&rect);

	pDC->StretchBlt(0,0,rect.Width(),rect.Height(),&dcCompatible,
		0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
	return TRUE;
	

}

⌨️ 快捷键说明

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