home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK11 / MFC / SAMPLES / TESTSERV / TESTSERV.H$ / testserv
Encoding:
Text File  |  1992-03-18  |  2.7 KB  |  103 lines

  1. // testserv.h : This file contains prototypes for the CTestServer class
  2. //              which inherits from CFrameWnd.
  3. //
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and Microsoft
  10. // QuickHelp documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14.  
  15. #ifndef __TESTSERV_H__
  16. #define __TESTSERV_H__
  17.  
  18. #include <afxole.h>
  19. #include "tsobject.h"
  20. #include "servdoc.h"
  21. #include "newserv.h"
  22.  
  23.  
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CTestServer:
  27. class CTestServer : public CFrameWnd
  28. {
  29. public:
  30.     CTestServer();
  31.     ~CTestServer();
  32.  
  33.     // windows messages
  34.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  35.     afx_msg void OnSize(UINT nType, int cx, int cy);
  36.     afx_msg void OnInitMenu(CMenu* pMenu);
  37.     afx_msg void OnClose();
  38.  
  39.     // menu commands
  40.     afx_msg void OnNew();
  41.     afx_msg void OnOpen();
  42.     afx_msg void OnSave();
  43.     afx_msg void OnSaveAs();
  44.     afx_msg void OnUpdate();
  45.     afx_msg void OnMenuExit();
  46.     afx_msg void OnCopyLink();
  47.     afx_msg void OnCopyObject();
  48.     afx_msg void OnLogging();
  49.     afx_msg void OnRevokeServerApi();
  50.     afx_msg void OnRevokeDocApi();
  51.     afx_msg void OnRevertDocApi();
  52.     afx_msg void OnSaveDocApi();
  53.     afx_msg void OnCloseDocApi();
  54.     afx_msg void OnChangeDocApi();
  55.     afx_msg void OnChangeItemApi();
  56.     afx_msg void OnAbout();
  57.  
  58.     // helper functions which do not handle messages
  59.     BOOL FileDlg (BOOL bOpen, int nMaxFile, LPSTR szFile);
  60.     BOOL LoadFile (const char* pName);
  61.     void Serialize (CArchive &ar);
  62.     void SaveFile (BOOL bNewFileName);
  63.     BOOL QuerySaveChanges();
  64.     BOOL QueryUpdateClient();
  65.     CServDoc* GetDocument() { return m_pDoc; };
  66.     void LogError(char *pszFileName, int nStatus);
  67.  
  68. #ifdef _DEBUG
  69.     virtual void AssertValid() const;
  70.     virtual void Dump(CDumpContext& dc) const;
  71. #endif
  72.  
  73.  
  74.     // member variables
  75.     static BOOL m_bCreationFailed;
  76.     BOOL m_bDirty, m_bUntitled, m_bLogging;
  77.     CServDoc*   m_pDoc;
  78.     CNewServer* m_pServer;
  79.     CServItem*  m_pItem;
  80.     CListBox*   m_pList;
  81.     CString m_szFileName;
  82.  
  83.     DECLARE_MESSAGE_MAP()
  84. };
  85.  
  86.  
  87. /////////////////////////////////////////////////////////////////////////////
  88. // CTestApp:
  89. // See testserv.cpp for the code to the InitInstance member function.
  90. //
  91. class CTestApp : public CWinApp
  92. {
  93. public:
  94.     CTestApp() : CWinApp("Test Server") { }
  95.     virtual BOOL InitInstance();
  96.     virtual int  ExitInstance();
  97. };
  98.  
  99.  
  100. /////////////////////////////////////////////////////////////////////////////
  101.  
  102. #endif // __TESTSERV_H__
  103.