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

📄 miningview.cpp

📁 用Visual c++写
💻 CPP
字号:
// miningView.cpp : implementation of the CMiningView class
//

#include "stdafx.h"
#include "mining.h"
#include "HuanYing.h"
#include "miningDoc.h"
#include "miningView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMiningView

IMPLEMENT_DYNCREATE(CMiningView, CFormView)

BEGIN_MESSAGE_MAP(CMiningView, CFormView)
	//{{AFX_MSG_MAP(CMiningView)
	
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMiningView construction/destruction

CMiningView::CMiningView()
	: CFormView(CMiningView::IDD)
{
	//{{AFX_DATA_INIT(CMiningView)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// TODO: add construction code here

}

CMiningView::~CMiningView()
{
}

void CMiningView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMiningView)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BOOL CMiningView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CFormView::PreCreateWindow(cs);
}

void CMiningView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();
	//欢迎界面
	CHuanYing	dlgHuanYing;
	int	nResult;
	nResult=dlgHuanYing.DoModal();

}

/////////////////////////////////////////////////////////////////////////////
// CMiningView printing

BOOL CMiningView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CMiningView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CMiningView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

void CMiningView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
	// TODO: add customized printing code here
}

/////////////////////////////////////////////////////////////////////////////
// CMiningView diagnostics

#ifdef _DEBUG
void CMiningView::AssertValid() const
{
	CFormView::AssertValid();
}

void CMiningView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

CMiningDoc* CMiningView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMiningDoc)));
	return (CMiningDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMiningView message handlers



void CMiningView::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	CBitmap	bmp;
	bmp.LoadBitmap(IDB_BITMAP1);
	CRect	rect;
	GetClientRect(rect);
	CBrush   brush;     
    brush.CreatePatternBrush(&bmp);
    dc.FillRect(rect,&brush);   

}

⌨️ 快捷键说明

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