msgview.cpp
来自「一个用VC++开发的Pascal编译器. 包括词法分析 语法分析 语义分析 中」· C++ 代码 · 共 74 行
CPP
74 行
// MsgView.cpp : implementation file
//
#include "stdafx.h"
#include "mini_Pascal.h"
#include "MsgView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMsgView
IMPLEMENT_DYNCREATE(CMsgView, CEditView)
CMsgView::CMsgView()
{
}
CMsgView::~CMsgView()
{
}
BEGIN_MESSAGE_MAP(CMsgView, CEditView)
//{{AFX_MSG_MAP(CMsgView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMsgView drawing
void CMsgView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CMsgView diagnostics
#ifdef _DEBUG
void CMsgView::AssertValid() const
{
CEditView::AssertValid();
}
void CMsgView::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMsgView message handlers
void CMsgView::AddMsg(CString str)
{
CEdit& edit = this->GetEditCtrl();
edit.SetSel(-1, -1);
edit.ReplaceSel("\r\n" + str);
}
void CMsgView::Clear()
{
CEdit& edit = this->GetEditCtrl();
edit.SetSel(0, -1);
edit.Clear();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?