📄 sq3doc.cpp
字号:
// Sq3Doc.cpp : implementation of the CSq3Doc class
//
#include "stdafx.h"
#include "Sq3.h"
#include "Sq3Doc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSq3Doc
IMPLEMENT_DYNCREATE(CSq3Doc, CDocument)
BEGIN_MESSAGE_MAP(CSq3Doc, CDocument)
//{{AFX_MSG_MAP(CSq3Doc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSq3Doc construction/destruction
CSq3Doc::CSq3Doc()
{
// TODO: add one-time construction code here
}
CSq3Doc::~CSq3Doc()
{
}
BOOL CSq3Doc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
const float SIDE=600.0F;
this->GetGrid().Create(SIDE,SIDE);
const float DENSITY = 400.0F/(400.0F*400.0F);
this->GetGrid().InitSimple((int)(SIDE*SIDE*DENSITY));
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CSq3Doc diagnostics
#ifdef _DEBUG
void CSq3Doc::AssertValid() const
{
CDocument::AssertValid();
}
void CSq3Doc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSq3Doc commands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -