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

📄 wizview.cpp

📁 讲mfc的书
💻 CPP
字号:
// wizView.cpp : implementation of the CWizView class
//

#include "stdafx.h"
#include "wiz.h"

#include "wizDoc.h"
#include "wizView.h"
#include "page1.h"
#include "page2.h"
#include "page3.h"

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

/////////////////////////////////////////////////////////////////////////////
// CWizView

IMPLEMENT_DYNCREATE(CWizView, CView)

BEGIN_MESSAGE_MAP(CWizView, CView)
	//{{AFX_MSG_MAP(CWizView)
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWizView construction/destruction

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

}

CWizView::~CWizView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CWizView drawing

void CWizView::OnDraw(CDC* pDC)
{
	CWizDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

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

/////////////////////////////////////////////////////////////////////////////
// CWizView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CWizView message handlers

void CWizView::OnLButtonDown(UINT nFlags, CPoint point) 
{
    CPropertySheet sheet;
	Page1 pg1;
	Page2 pg2;
	Page3 pg3;
	sheet.AddPage(&pg1);
	sheet.AddPage(&pg2);
	sheet.AddPage(&pg3);
	sheet.SetWizardMode();
	if (sheet.DoModal()==ID_WIZFINISH)
		{
		CString greet="Thank You ";
		greet+=pg1.m_name;
		MessageBox("You may pass",greet);
		}
	else
		{
		MessageBox("You are flung into the abyss");
		}
	
}

⌨️ 快捷键说明

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