📄 decodeview.cpp
字号:
// DecodeView.cpp : implementation of the CDecodeView class
//
#include "stdafx.h"
#include "Decode.h"
#include "DecodeDoc.h"
#include "DecodeView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDecodeView
IMPLEMENT_DYNCREATE(CDecodeView, CView)
BEGIN_MESSAGE_MAP(CDecodeView, CView)
//{{AFX_MSG_MAP(CDecodeView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDecodeView construction/destruction
CDecodeView::CDecodeView()
{
// TODO: add construction code here
}
CDecodeView::~CDecodeView()
{
}
BOOL CDecodeView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CDecodeView drawing
void CDecodeView::OnDraw(CDC* pDC)
{
CDecodeDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
LPCTSTR ps;
CString s="《人工智能》课程设计";
ps=(LPCTSTR) s;
pDoc->SetTitle(ps);
CRect rc;
GetClientRect(&rc);
CBitmap bm,*pbm;
BITMAP bmMetric;
bm.LoadBitmap(IDB_AI_BITMAP);
bm.GetBitmap(&bmMetric);
CDC memDC;
memDC.CreateCompatibleDC(pDC);
pbm=memDC.SelectObject(&bm);
pDC->StretchBlt(0,0,rc.right/2,rc.bottom,
&memDC,0,0,bmMetric.bmWidth,bmMetric.bmHeight,SRCCOPY);
memDC.SelectObject(pbm);
bm.DeleteObject();
memDC.DeleteDC();
}
/////////////////////////////////////////////////////////////////////////////
// CDecodeView diagnostics
#ifdef _DEBUG
void CDecodeView::AssertValid() const
{
CView::AssertValid();
}
void CDecodeView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CDecodeDoc* CDecodeView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDecodeDoc)));
return (CDecodeDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDecodeView message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -