treebugview.cpp

来自「讲mfc的书」· C++ 代码 · 共 98 行

CPP
98
字号
// treebugView.cpp : implementation of the CTreebugView class
//

#include "stdafx.h"
#include "treebug.h"

#include "treebugDoc.h"
#include "treebugView.h"
#include "baddlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTreebugView

IMPLEMENT_DYNCREATE(CTreebugView, CView)

BEGIN_MESSAGE_MAP(CTreebugView, CView)
	//{{AFX_MSG_MAP(CTreebugView)
	ON_COMMAND(ID_GO, OnGo)
	ON_COMMAND(ID_FIX, OnFix)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTreebugView construction/destruction

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

}

CTreebugView::~CTreebugView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CTreebugView drawing

void CTreebugView::OnDraw(CDC* pDC)
{
	CTreebugDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

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

/////////////////////////////////////////////////////////////////////////////
// CTreebugView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CTreebugView message handlers

void CTreebugView::OnGo() 
{
   CBadDlg dlg;
   dlg.Fix=FALSE;
   dlg.DoModal();
}

void CTreebugView::OnFix() 
{
   CBadDlg dlg;
   dlg.Fix=TRUE;
   dlg.DoModal();
}

⌨️ 快捷键说明

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