📄 smallchageview.cpp
字号:
// SmallChageView.cpp : implementation of the CSmallChageView class
//
#include "stdafx.h"
#include "SmallChage.h"
#include "SmallChageDoc.h"
#include "SmallChageView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSmallChageView
IMPLEMENT_DYNCREATE(CSmallChageView, CView)
BEGIN_MESSAGE_MAP(CSmallChageView, CView)
//{{AFX_MSG_MAP(CSmallChageView)
ON_COMMAND(IDM_SETTING, OnSetting)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSmallChageView construction/destruction
CSmallChageView::CSmallChageView()
{
// TODO: add construction code here
}
CSmallChageView::~CSmallChageView()
{
}
BOOL CSmallChageView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CSmallChageView drawing
void CSmallChageView::OnDraw(CDC* pDC)
{
CSmallChageDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CSmallChageView printing
BOOL CSmallChageView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSmallChageView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSmallChageView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSmallChageView diagnostics
#ifdef _DEBUG
void CSmallChageView::AssertValid() const
{
CView::AssertValid();
}
void CSmallChageView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CSmallChageDoc* CSmallChageView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSmallChageDoc)));
return (CSmallChageDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSmallChageView message handlers
void CSmallChageView::OnSetting()
{
// TODO: Add your command handler code here
m_CoinHandler.Initialization();
Strategy strategy = m_CoinHandler.m_Strategy;
m_CoinHandler.GetSolution(strategy);
int nOptimalNum = m_CoinHandler.GetMinimumCoinsNum();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -