?? miningview.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 + -