topview.cpp

来自「本程序源码是为日本一家地震监测机构编写的」· C++ 代码 · 共 78 行

CPP
78
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?