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

📄 ahnenvw.cpp

📁 API经典入门
💻 CPP
字号:
// ahnenvw.cpp : implementation file
//

#include "stdafx.h"
#include "tree.h"
#include "ahnenvw.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAhnenView

IMPLEMENT_DYNCREATE(CAhnenView, CView)

CAhnenView::CAhnenView()
{
}

CAhnenView::~CAhnenView()
{
}

CAhnenDoc* CAhnenView::GetDocument()
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAhnenDoc)));
	return (CAhnenDoc*)m_pDocument;
}

// **** we put the following Message Map in here
BEGIN_MESSAGE_MAP(CAhnenView, CView)
	//{{AFX_MSG_MAP(CAhnenView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CAhnenView drawing

void CAhnenView::OnDraw(CDC* pDC)
{
	CAhnenDoc* pDoc = GetDocument();
	CString temp; 
	// determining text height
	int offset = 2*(pDC->GetTextExtent("Wyig", 4)).cy; 
	
	for (int i = 0; i < pDoc->m_arrAhnentafel.GetSize(); i++)
	{
		_itoa(i+1, temp.GetBuffer(20), 10);
		temp.ReleaseBuffer();
		pDC->TextOut(5, offset*i, temp);
		pDC->TextOut(50,offset*i, pDoc->m_arrAhnentafel[i]);
	}
}

/////////////////////////////////////////////////////////////////////////////
// Printing support

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

/////////////////////////////////////////////////////////////////////////////
// CAhnenView message handlers
 

⌨️ 快捷键说明

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