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

📄 simpleeditview.h

📁 《AE库通用模块及典型系统开发实例导航》光盘内容分享!
💻 H
字号:
// SimpleEditView.h : interface of the CSimpleEditView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SIMPLEEDITVIEW_H__B542F553_6F6D_4914_A46D_21FB979BDDFA__INCLUDED_)
#define AFX_SIMPLEEDITVIEW_H__B542F553_6F6D_4914_A46D_21FB979BDDFA__INCLUDED_

#include "UndoStack.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CSimpleEditView : public CEditView
{
protected: // create from serialization only
	CSimpleEditView();
	DECLARE_DYNCREATE(CSimpleEditView)

// Attributes
public:
	CSimpleEditDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSimpleEditView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CSimpleEditView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	CUndoStack m_UndoStack;  //Undo堆栈
	//{{AFX_MSG(CSimpleEditView)
	afx_msg void OnFileSave();
	afx_msg void OnFileSaveAs();
	afx_msg void OnFormatFont();
	afx_msg void OnFileOpen();
	afx_msg void OnEditUndo();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CString m_PreText;	//最近一次没有Undo的文本
	bool m_IsChanged;	//文本是否改变,有改变才会向m_UndoStack中压栈
	CFont m_Font;
};

#ifndef _DEBUG  // debug version in SimpleEditView.cpp
inline CSimpleEditDoc* CSimpleEditView::GetDocument()
   { return (CSimpleEditDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SIMPLEEDITVIEW_H__B542F553_6F6D_4914_A46D_21FB979BDDFA__INCLUDED_)

⌨️ 快捷键说明

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