notepadeview.cpp

来自「该程序基于 windows ce 6.0 的模拟器CHSEmu (ARMV4I)」· C++ 代码 · 共 77 行

CPP
77
字号
// NotePadeView.cpp : implementation of the CNotePadeView class
//

#include "stdafx.h"
#include "NotePade.h"

#include "NotePadeDoc.h"
#include "NotePadeView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CNotePadeView

IMPLEMENT_DYNCREATE(CNotePadeView, CEditView)

BEGIN_MESSAGE_MAP(CNotePadeView, CEditView)
END_MESSAGE_MAP()

// CNotePadeView construction/destruction

CNotePadeView::CNotePadeView()
{
	// TODO: add construction code here
}

CNotePadeView::~CNotePadeView()
{
}

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

	return CEditView::PreCreateWindow(cs);
}

// CNotePadeView drawing
void CNotePadeView::OnDraw(CDC* /*pDC*/)
{
	CNotePadeDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

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

void CNotePadeView::OnInitialUpdate() 
{
    CEditView::OnInitialUpdate();
    // 设置窗口标题
    AfxGetMainWnd()->SetWindowText(L"Note Pade");
    // 设置初始文件路径变量
    CEdit& theEdit = GetEditCtrl();	
    m_strFilePath = L"";	
    theEdit.SetLimitText(128 * 1024);   // 设置文本长度, 单位字节
}

// CNotePadeView diagnostics

#ifdef _DEBUG
void CNotePadeView::AssertValid() const
{
	CEditView::AssertValid();
}

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

// CNotePadeView message handlers

⌨️ 快捷键说明

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