📄 chkpropview.cpp
字号:
// chkpropView.cpp : implementation of the CChkpropView class
//
#include "stdafx.h"
#include "chkprop.h"
#include "chkpropDoc.h"
#include "chkpropView.h"
#include "statuspg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChkpropView
IMPLEMENT_DYNCREATE(CChkpropView, CView)
BEGIN_MESSAGE_MAP(CChkpropView, CView)
//{{AFX_MSG_MAP(CChkpropView)
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChkpropView construction/destruction
CChkpropView::CChkpropView()
{
// TODO: add construction code here
}
CChkpropView::~CChkpropView()
{
}
BOOL CChkpropView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CChkpropView drawing
void CChkpropView::OnDraw(CDC* pDC)
{
CChkpropDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CChkpropView diagnostics
#ifdef _DEBUG
void CChkpropView::AssertValid() const
{
CView::AssertValid();
}
void CChkpropView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CChkpropDoc* CChkpropView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CChkpropDoc)));
return (CChkpropDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CChkpropView message handlers
void CChkpropView::OnLButtonDown(UINT nFlags, CPoint point)
{
CPropertySheet sheet("Checker Counts");
StatusPage redpage(IDS_REDSTRING), blackpage(IDS_BLKSTRING);
redpage.m_kings=0;
redpage.m_pieces=9;
blackpage.m_kings=2;
blackpage.m_pieces=10;
sheet.AddPage(&redpage);
sheet.AddPage(&blackpage);
if (sheet.DoModal()==IDOK)
{
// prop sheet was for information only, so we don't really care
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -