www.pudn.com > CLanCompiler.rar > CLanCompilerDoc.cpp
// CLanCompilerDoc.cpp : implementation of the CCLanCompilerDoc class
//
#include "stdafx.h"
#include "CLanCompiler.h"
extern CCLanCompilerApp theApp;
#include "MainFrm.h"
#include "CLanCompilerDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerDoc
IMPLEMENT_DYNCREATE(CCLanCompilerDoc, CDocument)
BEGIN_MESSAGE_MAP(CCLanCompilerDoc, CDocument)
//{{AFX_MSG_MAP(CCLanCompilerDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerDoc construction/destruction
CCLanCompilerDoc::CCLanCompilerDoc()
{
// TODO: add one-time construction code here
}
CCLanCompilerDoc::~CCLanCompilerDoc()
{
}
BOOL CCLanCompilerDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerDoc serialization
void CCLanCompilerDoc::Serialize(CArchive& ar)
{
// CEditView contains an edit control which handles all serialization
// ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
if(ar.IsStoring ())
{
CString str="";
CMainFrame *pFrame = (CMainFrame *)theApp.GetMainWnd();
pFrame->m_pEdit->GetWindowText(str);
// ar<Write(str,nLength);
}
else
{}
}
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerDoc diagnostics
#ifdef _DEBUG
void CCLanCompilerDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CCLanCompilerDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerDoc commands