📄 fullscrtestview.cpp
字号:
// FULLSCRTestView.cpp : implementation of the CFULLSCRTestView class
//
#include "stdafx.h"
#include "FULLSCRTest.h"
#include "FULLSCRTestDoc.h"
#include "FULLSCRTestView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFULLSCRTestView
IMPLEMENT_DYNCREATE(CFULLSCRTestView, CView)
BEGIN_MESSAGE_MAP(CFULLSCRTestView, CView)
//{{AFX_MSG_MAP(CFULLSCRTestView)
ON_WM_CHAR()
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CFULLSCRTestView construction/destruction
CFULLSCRTestView::CFULLSCRTestView()
{
// TODO: add construction code here
}
CFULLSCRTestView::~CFULLSCRTestView()
{
}
BOOL CFULLSCRTestView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CFULLSCRTestView drawing
void CFULLSCRTestView::OnDraw(CDC* pDC)
{
CFULLSCRTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CRect rc;
GetClientRect(&rc);
CBrush br(pDoc->m_clr),*ob;
ob=pDC->SelectObject(&br);
pDC->Ellipse(&rc);
pDC->SelectObject(&ob);
br.DeleteObject();
}
/////////////////////////////////////////////////////////////////////////////
// CFULLSCRTestView printing
BOOL CFULLSCRTestView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CFULLSCRTestView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CFULLSCRTestView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CFULLSCRTestView diagnostics
#ifdef _DEBUG
void CFULLSCRTestView::AssertValid() const
{
CView::AssertValid();
}
void CFULLSCRTestView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CFULLSCRTestDoc* CFULLSCRTestView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CFULLSCRTestDoc)));
return (CFULLSCRTestDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CFULLSCRTestView message handlers
void CFULLSCRTestView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
if (nChar == VK_ESCAPE)
{
CFrameWnd* pFrame = (CFrameWnd*) AfxGetMainWnd();
pFrame->PostMessage(WM_COMMAND, ID_FULL_SCREEN);
}
CView::OnChar(nChar, nRepCnt, nFlags);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -