// LTSCDoc.cpp : implementation of the CLTScrCprDoc class // #include "stdafx.h" #include "LTScrCpr.h" #include "LTSCDoc.h" #include "LTSCView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CLTScrCprDoc IMPLEMENT_DYNCREATE(CLTScrCprDoc, CDocument) BEGIN_MESSAGE_MAP(CLTScrCprDoc, CDocument) //{{AFX_MSG_MAP(CLTScrCprDoc) // 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() ///////////////////////////////////////////////////////////////////////////// // CLTScrCprDoc construction/destruction CLTScrCprDoc::CLTScrCprDoc() { // TODO: add one-time construction code here } CLTScrCprDoc::~CLTScrCprDoc() { } BOOL CLTScrCprDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; POSITION pos = GetFirstViewPosition(); CLTScrCprView *pView; L_INT iRetVal; CLTScrCprApp* pTheApp = (CLTScrCprApp*)AfxGetApp(); if(pos != NULL) // Get the view attached to this document pView = (CLTScrCprView*)GetNextView(pos); if(pView != NULL) { // Assigne view window handle to the bitmap iRetVal = pView->m_LBmpWnd.SetHandle(pTheApp->m_LUserBmp.GetHandle()); if(iRetVal != SUCCESS) return FALSE; SetTitle(pTheApp->m_szCaption); } return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CLTScrCprDoc serialization void CLTScrCprDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CLTScrCprDoc diagnostics #ifdef _DEBUG void CLTScrCprDoc::AssertValid() const { CDocument::AssertValid(); } void CLTScrCprDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CLTScrCprDoc commands