CAD2006Doc.cpp
资源名称:CAD2006.rar [点击查看]
上传用户:ckg1000
上传日期:2013-01-26
资源大小:630k
文件大小:2k
源码类别:
CAD
开发平台:
Visual C++
- // CAD2006Doc.cpp : implementation of the CCAD2006Doc class
- //
- #include "stdafx.h"
- #include "CAD2006.h"
- #include "CAD2006Doc.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CCAD2006Doc
- IMPLEMENT_DYNCREATE(CCAD2006Doc, CDocument)
- BEGIN_MESSAGE_MAP(CCAD2006Doc, CDocument)
- //{{AFX_MSG_MAP(CCAD2006Doc)
- // 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()
- /////////////////////////////////////////////////////////////////////////////
- // CCAD2006Doc construction/destruction
- CCAD2006Doc::CCAD2006Doc()
- {
- // TODO: add one-time construction code here
- /* m_shapetool->SetBackColor(RGB(0,0,0));
- m_shapetool->SetBorderColor(RGB(0,0,0));
- m_shapetool->SetBorderStyle(PS_SOLID);
- m_shapetool->SetBorderWidth(1);*/
- // m_shapetool = new CShape;
- m_tool = arrow;
- m_shape = shape;
- }
- CCAD2006Doc::~CCAD2006Doc()
- {
- for( int i = 0; i < m_shapearray.GetSize() -1; i++ )
- {
- CShape* temp = (CShape*)m_shapearray.operator [](i);
- delete temp;
- }
- // delete m_shapetool;
- }
- BOOL CCAD2006Doc::OnNewDocument()
- {
- if (!CDocument::OnNewDocument())
- return FALSE;
- // TODO: add reinitialization code here
- // (SDI documents will reuse this document)
- return TRUE;
- }
- /////////////////////////////////////////////////////////////////////////////
- // CCAD2006Doc serialization
- void CCAD2006Doc::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- // TODO: add storing code here
- }
- else
- {
- // TODO: add loading code here
- }
- }
- /////////////////////////////////////////////////////////////////////////////
- // CCAD2006Doc diagnostics
- #ifdef _DEBUG
- void CCAD2006Doc::AssertValid() const
- {
- CDocument::AssertValid();
- }
- void CCAD2006Doc::Dump(CDumpContext& dc) const
- {
- CDocument::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CCAD2006Doc commands