📄 tgrammview.cpp
字号:
// TGrammView.cpp : implementation of the CTGrammView class
//
#include "stdafx.h"
#include "TGramm.h"
#include "TGrammDoc.h"
#include "TGrammView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTGrammView
IMPLEMENT_DYNCREATE(CTGrammView, CView)
BEGIN_MESSAGE_MAP(CTGrammView, CView)
//{{AFX_MSG_MAP(CTGrammView)
ON_WM_CREATE()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTGrammView construction/destruction
CTGrammView::CTGrammView()
{
// TODO: add construction code here
}
CTGrammView::~CTGrammView()
{
}
BOOL CTGrammView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
BOOL bPreCreated = CView::PreCreateWindow(cs);
cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
return bPreCreated;
}
/////////////////////////////////////////////////////////////////////////////
// CTGrammView drawing
void CTGrammView::OnDraw(CDC* pDC)
{
CTGrammDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CTGrammView printing
BOOL CTGrammView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default CEditView preparation
return CView::OnPreparePrinting(pInfo);
}
void CTGrammView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// Default CEditView begin printing.
CView::OnBeginPrinting(pDC, pInfo);
}
void CTGrammView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// Default CEditView end printing
CView::OnEndPrinting(pDC, pInfo);
}
/////////////////////////////////////////////////////////////////////////////
// CTGrammView diagnostics
#ifdef _DEBUG
void CTGrammView::AssertValid() const
{
CView::AssertValid();
}
void CTGrammView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CTGrammDoc* CTGrammView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTGrammDoc)));
return (CTGrammDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTGrammView message handlers
void CTGrammView::OnButton32772()
{
// TODO: Add your command handler code here
CTGrammDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CDC *pDC = GetDC();
// TODO: add draw code for native data here
}
int CTGrammView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
/* 创建左右两个视图 */
return 0;
}
/*
* 创建视图
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -