📄 grdemodoc.cpp
字号:
// GrDemoDoc.cpp : implementation of the CGrDemoDoc class
//
#include "stdafx.h"
#include "GrDemo.h"
#include "GrDemoDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGrDemoDoc
IMPLEMENT_DYNCREATE(CGrDemoDoc, CDocument)
BEGIN_MESSAGE_MAP(CGrDemoDoc, CDocument)
//{{AFX_MSG_MAP(CGrDemoDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CGrDemoDoc construction/destruction
CGrDemoDoc::CGrDemoDoc()
{
x[0] = 5;
y[0] = 70;
x[1] = 30;
y[1] = 30;
x[2] = 40;
y[2] = 4;
x[3] = 70;
y[3] = 50;
x[4] = 80;
y[4] = 80;
pt[0] = CTPoint<float>(4, 20);
pt[1] = CTPoint<float>(35, 40);
pt[2] = CTPoint<float>(50, 4);
pt[3] = CTPoint<float>(60, 60);
pt[4] = CTPoint<float>(75, 85);
RawData[0] = 50;
RawData[1] = 150;
RawData[2] = 300;
RawData[3] = 100;
RawData[4] = 200;
RawData[5] = 700;
RawData[6] = 300;
RawData[7] = 200;
RawData[8] = 500;
RawData[9] = 100;
RawData[10] = 30;
RawData[11] = 100;
RawData[12] = 400;
RawData[13] = 700;
RawData[14] = 800;
rowstr[0] = "row1";
rowstr[1] = "row2";
rowstr[2] = "row3";
colstr[0] = "Jan.";
colstr[1] = "Feb.";
colstr[2] = "March";
colstr[3] = "April";
colstr[4] = "May";
}
CGrDemoDoc::~CGrDemoDoc()
{
}
BOOL CGrDemoDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CGrDemoDoc serialization
void CGrDemoDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CGrDemoDoc diagnostics
#ifdef _DEBUG
void CGrDemoDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CGrDemoDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CGrDemoDoc commands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -