www.pudn.com > EasyReport.rar > EasyReportDoc.cpp


// EasyReportDoc.cpp : implementation of the CEasyReportDoc class 
// 
 
#include "stdafx.h" 
#include "EasyReport.h" 
 
#include "EasyReportDoc.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CEasyReportDoc 
 
IMPLEMENT_DYNCREATE(CEasyReportDoc, CDocument) 
 
BEGIN_MESSAGE_MAP(CEasyReportDoc, CDocument) 
	//{{AFX_MSG_MAP(CEasyReportDoc) 
		// 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() 
 
///////////////////////////////////////////////////////////////////////////// 
// CEasyReportDoc construction/destruction 
 
CEasyReportDoc::CEasyReportDoc() 
{ 
	// TODO: add one-time construction code here 
 
} 
 
CEasyReportDoc::~CEasyReportDoc() 
{ 
} 
 
BOOL CEasyReportDoc::OnNewDocument() 
{ 
	if (!CDocument::OnNewDocument()) 
		return FALSE; 
 
	// TODO: add reinitialization code here 
	// (SDI documents will reuse this document) 
 
	return TRUE; 
} 
 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CEasyReportDoc serialization 
 
void CEasyReportDoc::Serialize(CArchive& ar) 
{ 
	if (ar.IsStoring()) 
	{ 
	AfxMessageBox("SaveFile001"); 
	} 
	else 
	{ 
	 
	} 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CEasyReportDoc diagnostics 
 
#ifdef _DEBUG 
void CEasyReportDoc::AssertValid() const 
{ 
	CDocument::AssertValid(); 
} 
 
void CEasyReportDoc::Dump(CDumpContext& dc) const 
{ 
	CDocument::Dump(dc); 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CEasyReportDoc commands 
 
BOOL CEasyReportDoc::OnOpenDocument(LPCTSTR lpszPathName)  
{ 
	if (!CDocument::OnOpenDocument(lpszPathName)) 
		return FALSE; 
 
	return TRUE; 
} 
 
BOOL CEasyReportDoc::OnSaveDocument(LPCTSTR lpszPathName) 
{ 
	// TODO: Add your specialized code here and/or call the base class 
	/*CEasyREPortView *pView; 
	pView->m_pGridCtrl->SetItemText(1, 1, "DKJG");*/ 
	return CDocument::OnSaveDocument(lpszPathName); 
}