📄 demoview.cpp
字号:
// DemoView.cpp : implementation file
//
#include "stdafx.h"
#include "test.h"
#include "DemoView.h"
#include "TestDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDemoView
IMPLEMENT_DYNCREATE(CDemoView, CView)
CDemoView::CDemoView()
{index=0;
}
CDemoView::~CDemoView()
{
}
BEGIN_MESSAGE_MAP(CDemoView, CView)
//{{AFX_MSG_MAP(CDemoView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDemoView drawing
void CDemoView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
for (int i=0;i<demo.GetSize();i++)
{
pDC->TextOut(1,(i)*20,demo.GetAt(i));
}
index=i;
}
/////////////////////////////////////////////////////////////////////////////
// CDemoView diagnostics
#ifdef _DEBUG
void CDemoView::AssertValid() const
{
CView::AssertValid();
}
void CDemoView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDemoView message handlers
void CDemoView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CTestDoc *pDoc=(CTestDoc *)GetDocument();
// demo=pDoc->showme;
}
void CDemoView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
if (lHint==2)
{
Invalidate();
demo.Copy(*((strarr*)pHint));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -