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

📄 modaldemoview.cpp

📁 Visual_C++[1].NET_Bible1 Visual_C++宝典书中的全部源码
💻 CPP
字号:
// ModalDemoView.cpp : implementation of the CModalDemoView class
//

#include "stdafx.h"
#include "ModalDemo.h"

#include "FindSheet.h"
#include "ModalDemoDoc.h"
#include "ModalDemoView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

#include "FindPage.h"
#include "ResultsPage.h"

// CModalDemoView

IMPLEMENT_DYNCREATE(CModalDemoView, CView)

BEGIN_MESSAGE_MAP(CModalDemoView, CView)
	// 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)
  ON_COMMAND(ID_BOOKS_FINDBOOK, OnBooksFindbook)
END_MESSAGE_MAP()

// CModalDemoView construction/destruction

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

}

CModalDemoView::~CModalDemoView()
{
}

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

	return CView::PreCreateWindow(cs);
}

// CModalDemoView drawing

void CModalDemoView::OnDraw(CDC* /*pDC*/)
{
	CModalDemoDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

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


// CModalDemoView printing

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

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

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


// CModalDemoView diagnostics

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

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

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


// CModalDemoView message handlers

void CModalDemoView::OnBooksFindbook()
{
 CFindSheet sheet(IDS_FIND);
 CFindPage pageFind;
 CResultsPage pageResults;

 sheet.AddPage(&pageFind);
 sheet.AddPage(&pageResults);
 sheet.DoModal();
}

⌨️ 快捷键说明

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