📄 editorview.h
字号:
// EditorView.h : CEditorView 类的接口
//
#pragma once
#include "afxwin.h"
class CEditorView : public CFormView
{
protected: // 仅从序列化创建
CEditorView();
DECLARE_DYNCREATE(CEditorView)
public:
enum{ IDD = IDD_EDITOR_FORM };
// 属性
public:
CEditorDoc* GetDocument() const;
CFindReplaceDialog* m_pfrDlg;
bool IsFind;
// 操作
public:
void OnReplaceAll(LPCTSTR lpszFind, LPCTSTR lpszReplace, BOOL bCase);
void OnReplaceSel(LPCTSTR lpszFind, BOOL bNext, BOOL bCase,LPCTSTR lpszReplace);
void OnFindNext(LPCTSTR lpszFind, BOOL bNext, BOOL bCase);
// 重写
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
virtual void OnInitialUpdate(); // 构造后第一次调用
// 实现
public:
virtual ~CEditorView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
afx_msg LONG OnFindReplace(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
CEdit TextEdit;
afx_msg void OnEditFind();
afx_msg void OnEditReplace();
};
#ifndef _DEBUG // EditorView.cpp 的调试版本
inline CEditorDoc* CEditorView::GetDocument() const
{ return reinterpret_cast<CEditorDoc*>(m_pDocument); }
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -