📄 topview.cpp
字号:
// TopView.cpp : implementation file
//
#include "stdafx.h"
#include "CQuakeDemo.h"
#include "TopView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTopView
IMPLEMENT_DYNCREATE(CTopView, CBaseView)
CTopView::CTopView()
{
m_Pictitle.Load("title.gif");
}
CTopView::~CTopView()
{
}
BEGIN_MESSAGE_MAP(CTopView, CBaseView)
//{{AFX_MSG_MAP(CTopView)
ON_WM_ERASEBKGND()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTopView drawing
void CTopView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
CRect ClientRect;
CRect PicRect;
GetClientRect(ClientRect);
CSize PicSize(m_Pictitle.m_Width,m_Pictitle.m_Height);
CRectPlus::CalcSizeInRect(ClientRect,PicSize,PicRect);
pDC->FillSolidRect(ClientRect,RGB(0,0,0));
m_Pictitle.Show(pDC,PicRect);
pDC->SetTextColor(RGB( 99,101, 99));
pDC->SetBkColor(RGB(0,0,0));
CString strLoad;
strLoad.LoadString(IDS_STRING_TOP_1);
pDC->TextOut(ClientRect.left,ClientRect.top,strLoad);
}
/////////////////////////////////////////////////////////////////////////////
// CTopView diagnostics
#ifdef _DEBUG
void CTopView::AssertValid() const
{
CBaseView::AssertValid();
}
void CTopView::Dump(CDumpContext& dc) const
{
CBaseView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTopView message handlers
BOOL CTopView::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -