home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK11 / MFC / SAMPLES / TESTSERV / TSOBJECT.H$ / tsobject
Encoding:
Text File  |  1992-03-07  |  2.1 KB  |  86 lines

  1. // tsobject.h : This file contains prototypes for the CEditObjectDlg and
  2. //      CServItem classes.  CServItem inherits from COleServerItem
  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.  
  16.  
  17. #ifndef __TSOBJECT_H__
  18. #define __TSOBJECT_H__
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. class CServDoc;
  22. class CTestServer;
  23.  
  24. class CEditObjectDlg : public CModalDialog
  25. {   
  26. public:
  27.     CString m_Text;
  28.     CEdit *pWnd;
  29.     
  30.     CEditObjectDlg(CWnd* pWnd, CString stringText);
  31.  
  32.     BOOL OnInitDialog();
  33.     void OnOK();
  34.     void OnCancel();
  35.  
  36.     DECLARE_MESSAGE_MAP()
  37. };
  38.  
  39.  
  40.  
  41. class CServItem : public COleServerItem
  42. {
  43.     DECLARE_SERIAL(CServItem)
  44. public:
  45.     // constructors and destructors
  46.     CServItem(CTestServer *pTest, CServDoc* pDoc, 
  47.         LPCSTR lpszDocName, LPCSTR lpszItemName);
  48.     CServItem();
  49.  
  50.     // Non-required overrides and helper functions
  51.     virtual BOOL        OnGetTextData(CString &stringText);
  52.     virtual HANDLE      GetLinkData();
  53.     virtual OLESTATUS   OnRelease();
  54.             void        SetDocName(LPCSTR pName) 
  55.                             { m_DocName = pName; };
  56.             BOOL        IsConnected() 
  57.                             { return COleServerItem::IsConnected(); };
  58.  
  59.     // Debugging functions
  60. #ifdef _DEBUG
  61.     virtual void        AssertValid() const;
  62.     virtual void        Dump (CDumpContext &dc) const;
  63. #endif
  64.  
  65.     // public attributes
  66.     CString         m_Text;
  67.     CTestServer*    m_pOwner;
  68.     CRect           m_Rect;
  69.  
  70. // Overridables
  71. protected:
  72.     virtual OLESTATUS   OnShow(BOOL bTakeFocus);
  73.     virtual OLESTATUS   OnSetBounds(LPRECT lpRect);
  74.     virtual BOOL        OnDraw(CMetaFileDC* pDC);
  75.     void Serialize (CArchive &ar);
  76.  
  77.     // protected attributes
  78.     CString m_DocName;
  79.     CString m_ItemName;
  80. };
  81.  
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84.  
  85. #endif // __TSOBJECT_H__
  86.