home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / npp / npdoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  1.4 KB  |  70 lines

  1. // npdoc.cpp : implementation of the CNotepadDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "np.h"
  6.  
  7. #include "npdoc.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CNotepadDoc
  16.  
  17. IMPLEMENT_DYNCREATE(CNotepadDoc, CDocument)
  18.  
  19. BEGIN_MESSAGE_MAP(CNotepadDoc, CDocument)
  20.     //{{AFX_MSG_MAP(CNotepadDoc)
  21.     //}}AFX_MSG_MAP
  22. END_MESSAGE_MAP()
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CNotepadDoc construction/destruction
  26.  
  27. CNotepadDoc::CNotepadDoc()
  28. {
  29. }
  30.  
  31. CNotepadDoc::~CNotepadDoc()
  32. {
  33. }
  34.  
  35. BOOL CNotepadDoc::OnNewDocument()
  36. {
  37.     if (!CDocument::OnNewDocument())
  38.         return FALSE;
  39.  
  40.     ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
  41.  
  42.     return TRUE;
  43. }
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CNotepadDoc serialization
  47.  
  48. void CNotepadDoc::Serialize(CArchive& ar)
  49. {
  50.     ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
  51. }
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CNotepadDoc diagnostics
  55.  
  56. #ifdef _DEBUG
  57. void CNotepadDoc::AssertValid() const
  58. {
  59.     CDocument::AssertValid();
  60. }
  61.  
  62. void CNotepadDoc::Dump(CDumpContext& dc) const
  63. {
  64.     CDocument::Dump(dc);
  65. }
  66. #endif //_DEBUG
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CNotepadDoc commands
  70.