home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / VFORM.ZIP / Samples / VfbEx / VfbExDoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-10  |  2.1 KB  |  102 lines

  1. // VfbExDoc.cpp : implementation of the CVfbExDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "VfbEx.h"
  6.  
  7. #include "VfbExDoc.h"
  8. #include "VfbExView.h"
  9.  
  10. #include "VfbLoad.h"
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CVfbExDoc
  20.  
  21. IMPLEMENT_DYNCREATE(CVfbExDoc, CDocument)
  22.  
  23. BEGIN_MESSAGE_MAP(CVfbExDoc, CDocument)
  24.     //{{AFX_MSG_MAP(CVfbExDoc)
  25.         // NOTE - the ClassWizard will add and remove mapping macros here.
  26.         //    DO NOT EDIT what you see in these blocks of generated code!
  27.     //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CVfbExDoc construction/destruction
  32.  
  33. CVfbExDoc::CVfbExDoc()
  34. {
  35.     // TODO: add one-time construction code here
  36.  
  37. }
  38.  
  39. BOOL CVfbExDoc::OnOpenDocument(LPCTSTR lpszPathName) 
  40. {
  41.     // if (!CDocument::OnOpenDocument(lpszPathName))
  42.     //     return FALSE;
  43.  
  44.     SetModifiedFlag(FALSE);     // start off with unmodified
  45.  
  46.     POSITION pos = GetFirstViewPosition();
  47.     CVfbExView *pView = (CVfbExView *) GetNextView(pos);
  48.     return pView->LoadVfbFile(lpszPathName);
  49. }
  50.  
  51.  
  52. CVfbExDoc::~CVfbExDoc()
  53. {
  54. }
  55.  
  56. BOOL CVfbExDoc::OnNewDocument()
  57. {
  58.     if (!CDocument::OnNewDocument())
  59.         return FALSE;
  60.  
  61.     // TODO: add reinitialization code here
  62.     // (SDI documents will reuse this document)
  63.  
  64.     return TRUE;
  65. }
  66.  
  67.  
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CVfbExDoc serialization
  71.  
  72. void CVfbExDoc::Serialize(CArchive& ar)
  73. {
  74.     if (ar.IsStoring())
  75.     {
  76.         // TODO: add storing code here
  77.     }
  78.     else
  79.     {
  80.         // TODO: add loading code here
  81.     }
  82. }
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. // CVfbExDoc diagnostics
  86.  
  87. #ifdef _DEBUG
  88. void CVfbExDoc::AssertValid() const
  89. {
  90.     CDocument::AssertValid();
  91. }
  92.  
  93. void CVfbExDoc::Dump(CDumpContext& dc) const
  94. {
  95.     CDocument::Dump(dc);
  96. }
  97. #endif //_DEBUG
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100. // CVfbExDoc commands
  101.  
  102.