home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c031 / 8.ddi / MFC / SAMPLES / TESTCLNT / NEWDOC.CP$ / newdoc
Encoding:
Text File  |  1992-01-15  |  1.4 KB  |  59 lines

  1. // newdoc.cpp : This file contains code for the CNewClientDoc class which
  2. //              implements the pure virtual functions required by the
  3. //              COleClientDoc class.
  4. //
  5. // This is a part of the Microsoft Foundation Classes C++ library.
  6. // Copyright (C) 1992 Microsoft Corporation
  7. // All rights reserved.
  8. //
  9. // This source code is only intended as a supplement to the
  10. // Microsoft Foundation Classes Reference and Microsoft
  11. // QuickHelp documentation provided with the library.
  12. // See these sources for detailed information regarding the
  13. // Microsoft Foundation Classes product.
  14.  
  15. #include "testclnt.h"
  16.  
  17.  
  18. IMPLEMENT_DYNAMIC(CNewClientDoc,COleClientDoc)
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CNewClientDoc constructor:
  22. //
  23. CNewClientDoc::CNewClientDoc(CTestClient *pParent) : COleClientDoc()
  24. {
  25.     m_pOwner = pParent;
  26. }
  27.  
  28.  
  29.  
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CNewClientDoc destructor:
  33. //
  34. CNewClientDoc::~CNewClientDoc()
  35. {
  36.     m_pOwner = NULL;
  37. }
  38.  
  39.  
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CNewClientDoc GetNextItem(POSITION& rPosition, BOOL*)
  43. //
  44. COleClientItem* CNewClientDoc::GetNextItem(POSITION& rPosition, BOOL*)
  45. {
  46.     ASSERT(m_pOwner != NULL);
  47.  
  48.     if (rPosition == NULL)
  49.     {
  50.         rPosition = (POSITION) 1;
  51.         return m_pOwner->m_pClient;
  52.     }
  53.     else
  54.     {
  55.         return NULL;
  56.     }
  57. }
  58.  
  59.