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

📄 rmview.cpp

📁 本人自己做的简单的宿舍管理系统!!添加删除
💻 CPP
字号:
// RMView.cpp : implementation of the CRMView class
//

#include "stdafx.h"
#include "RM.h"

#include "RMDoc.h"
#include "RMView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CRMView

IMPLEMENT_DYNCREATE(CRMView, CView)

BEGIN_MESSAGE_MAP(CRMView, CView)
	//{{AFX_MSG_MAP(CRMView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRMView construction/destruction

CRMView::CRMView()
{
	// TODO: add construction code here

}

CRMView::~CRMView()
{
}

BOOL CRMView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CRMView drawing

void CRMView::OnDraw(CDC* pDC)
{
	CRMDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	LOGFONT lf;
	memset(&lf,0,sizeof(LOGFONT));
	lf.lfHeight=30;
	lf.lfWidth=20;
	CFont font;   
	font.CreateFontIndirect(&lf);   
	CFont *oldFont=pDC->SelectObject(&font);
	strcpy((LPSTR)&(lf.lfFaceName),"宋体");
	pDC->SetTextColor(RGB(255,0,0));
	pDC->SetTextAlign(TA_CENTER);
	pDC->TextOut(400,40,"以下是所有制作人名单");
	pDC->TextOut(400,100,"陈江勇 105022005042");
	pDC->TextOut(400,150,"蔡银珠 105022005049");
	pDC->TextOut(400,200,"陈美金 105022005050");
	pDC->TextOut(400,250,"陈洁逾 105022005051");
	pDC->TextOut(400,300,"本系统未抄袭任何书本!");
	pDC->SelectObject(oldFont);
	font.DeleteObject();

	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CRMView printing

BOOL CRMView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CRMView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CRMView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CRMView diagnostics

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

void CRMView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CRMDoc* CRMView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRMDoc)));
	return (CRMDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CRMView message handlers

⌨️ 快捷键说明

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