📄 testeso1view.cpp
字号:
// TestESO1View.cpp : implementation of the CTestESO1View class
//
#include "stdafx.h"
#include "TestESO1.h"
#include "TestESO1Doc.h"
#include "TestESO1View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTestESO1View
IMPLEMENT_DYNCREATE(CTestESO1View, CEditView)
BEGIN_MESSAGE_MAP(CTestESO1View, CEditView)
//{{AFX_MSG_MAP(CTestESO1View)
ON_WM_CREATE()
//}}AFX_MSG_MAP
ON_MESSAGE (WM_USER_ERASE, OnErase)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestESO1View construction/destruction
CTestESO1View::CTestESO1View()
{
// TODO: add construction code here
}
CTestESO1View::~CTestESO1View()
{
}
BOOL CTestESO1View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
BOOL bPreCreated = CEditView::PreCreateWindow(cs);
cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
return bPreCreated;
}
/////////////////////////////////////////////////////////////////////////////
// CTestESO1View drawing
void CTestESO1View::OnDraw(CDC* pDC)
{
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CTestESO1View diagnostics
#ifdef _DEBUG
void CTestESO1View::AssertValid() const
{
CEditView::AssertValid();
}
void CTestESO1View::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
CTestESO1Doc* CTestESO1View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTestESO1Doc)));
return (CTestESO1Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTestESO1View message handlers
int CTestESO1View::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CEditView::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
void CTestESO1View::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
CTestESO1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CString strText;
GetEditCtrl().GetWindowText(strText);
strText+=pDoc->m_strInfo;
GetEditCtrl().SetWindowText(strText);
}
LRESULT CTestESO1View::OnErase (WPARAM wParam, LPARAM lParam)
{
CString strText(_T(""));
GetEditCtrl().SetWindowText(strText);
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -