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

📄 readerview.cpp

📁 支持各种文件格式的阅读器
💻 CPP
字号:
// readerView.cpp : implementation of the CReaderView class
//

#include "stdafx.h"
#include "reader.h"

#include "readerDoc.h"
#include "readerView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CReaderView

IMPLEMENT_DYNCREATE(CReaderView, CView)

BEGIN_MESSAGE_MAP(CReaderView, CView)
	//{{AFX_MSG_MAP(CReaderView)
		// 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
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CReaderView construction/destruction

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

}

CReaderView::~CReaderView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CReaderView drawing

void CReaderView::OnDraw(CDC* pDC)
{
	CReaderDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
/*
	const class CString &a="i am stone.\nhow are you!\nfine!thank you!";
	struct tagRECT b={0,0,40,5000};
	//pDC->MoveTo(5,5);
	//pDC->LineTo(6,6);
	pDC->DrawText(a,&b,DT_PATH_ELLIPSIS );
	//pDC->TextOut(0,0,a);
	b.top=200;
	const class CString &c="aaaaaaaaaa\nbbbbb\tbbbbbb\ncccccccccccc";
	//pDC->DrawText(c,&b,DT_PATH_ELLIPSIS);//DT_PATH_ELLIPSIS输出转意字符(不含\t)
	pDC->DrawText(a,&b,DT_EXPANDTABS|DT_CENTER|DT_EXTERNALLEADING|DT_WORDBREAK);//DT_EXPANDTABS同上,但含\t
*/	

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

/////////////////////////////////////////////////////////////////////////////
// CReaderView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CReaderView message handlers

⌨️ 快捷键说明

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