⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bottomview.cpp

📁 本程序源码是为日本一家地震监测机构编写的
💻 CPP
字号:
// BottomView.cpp : implementation file
//

#include "stdafx.h"
#include "CQuakeDemo.h"
#include "BottomView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBottomView

IMPLEMENT_DYNCREATE(CBottomView, CBaseView)

CBottomView::CBottomView()
{
	m_pFileManager	=	NULL;
}

CBottomView::~CBottomView()
{
}


BEGIN_MESSAGE_MAP(CBottomView, CBaseView)
	//{{AFX_MSG_MAP(CBottomView)
	ON_WM_ERASEBKGND()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBottomView drawing

void CBottomView::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
	BitBltMemDC(pDC);
}

/////////////////////////////////////////////////////////////////////////////
// CBottomView diagnostics

#ifdef _DEBUG
void CBottomView::AssertValid() const
{
	CBaseView::AssertValid();
}

void CBottomView::Dump(CDumpContext& dc) const
{
	CBaseView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CBottomView message handlers

BOOL CBottomView::OnEraseBkgnd(CDC* pDC) 
{
	return TRUE;
}

void CBottomView::SetFileManager(CQuakeFileManager* pFileManager)
{
	ASSERT(pFileManager != NULL);
	m_pFileManager = pFileManager;
}

void CBottomView::ClearView()
{
}

void CBottomView::UpdateView()
{
	CRect ClientRect;
	GetClientRect(ClientRect);
	CClientDC dc(this);
	CDC *pMemDC = CreateMemDC(&dc);
	//////////////////////////////////////////////////////////////////
	CString strTitle;
	CString strLoad;
	pMemDC->FillSolidRect(ClientRect,RGB(0,0,0));	
	if(m_pFileManager != NULL)
	{
		pMemDC->SetTextColor(RGB(255,255,255));
		strLoad.LoadString(IDS_STRING_BOTTOM_1);
		strTitle.Format(strLoad,m_pFileManager->GetFileCount(),m_pFileManager->GetValidDateLength());
		pMemDC->DrawText(strTitle,ClientRect,DT_SINGLELINE|DT_VCENTER);
	}
	//////////////////////////////////////////////////////////////////
	InvalidateRect(ClientRect);
}

void CBottomView::OnSize(UINT nType, int cx, int cy) 
{
	CBaseView::OnSize(nType, cx, cy);
	UpdateView();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -