// ConViewDoc.cpp : implementation of the CConViewDoc class // #include "stdafx.h" #include "MSVC5conview.h" #include "MSVC5ConViewDoc.h" #include "MSVC5ConViewView.h" #include "leadrastercontainercell.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CConViewDoc IMPLEMENT_DYNCREATE(CConViewDoc, CDocument) BEGIN_MESSAGE_MAP(CConViewDoc, CDocument) //{{AFX_MSG_MAP(CConViewDoc) // 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() ///////////////////////////////////////////////////////////////////////////// // CConViewDoc construction/destruction CConViewDoc::CConViewDoc() { // TODO: add one-time construction code here } CConViewDoc::~CConViewDoc() { } BOOL CConViewDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CConViewDoc serialization void CConViewDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CConViewDoc diagnostics #ifdef _DEBUG void CConViewDoc::AssertValid() const { CDocument::AssertValid(); } void CConViewDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CConViewDoc commands BOOL CConViewDoc::OnOpenDocument(LPCTSTR lpszPathName) { if (!CDocument::OnOpenDocument(lpszPathName)) return FALSE; CConViewApp * pTheApp = (CConViewApp *)AfxGetApp(); CConViewView * pView = (CConViewView*)GetView(); if (!pTheApp || !pView) return FALSE; return (pView->LoadCellFromFile((TCHAR *)lpszPathName)); } CView * CConViewDoc::GetView() { POSITION pos = GetFirstViewPosition(); return GetNextView(pos); }