📄 gridtestview.cpp
字号:
// GridTestView.cpp : implementation of the CGridTestView class
//
#include "stdafx.h"
#include "GridTest.h"
#include "GridTestDoc.h"
#include "GridTestView.h"
#include "GridTestDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGridTestView
IMPLEMENT_DYNCREATE(CGridTestView, CView)
BEGIN_MESSAGE_MAP(CGridTestView, CView)
//{{AFX_MSG_MAP(CGridTestView)
ON_WM_LBUTTONDOWN()
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CGridTestView construction/destruction
CGridTestView::CGridTestView()
{
// TODO: add construction code here
}
CGridTestView::~CGridTestView()
{
}
BOOL CGridTestView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CGridTestView drawing
void CGridTestView::OnDraw(CDC* pDC)
{
CGridTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->TextOut( 10,10,"Click your left mouse,please!");
}
/////////////////////////////////////////////////////////////////////////////
// CGridTestView printing
BOOL CGridTestView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CGridTestView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CGridTestView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CGridTestView diagnostics
#ifdef _DEBUG
void CGridTestView::AssertValid() const
{
CView::AssertValid();
}
void CGridTestView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CGridTestDoc* CGridTestView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGridTestDoc)));
return (CGridTestDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CGridTestView message handlers
void CGridTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CGridTestDlg dlg;
dlg.DoModal();
CView::OnLButtonDown(nFlags, point);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -