home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / dllhusk / testdll1.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  80 lines

  1. // TESTDLL1.H Public API exported from 'TESTDLL1.DLL'
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. // Note: This sample uses AFX_EXT_CLASS to export an entire class.
  14. // This avoids creating a .DEF file with all the decorated names for
  15. // the class.  Creating a .DEF file is more efficient since the names
  16. // can be exported by ordinal.  To use that method of exporting, much
  17. // like MFC does itself, uncomment the following two lines and add
  18. // the appropriate lines to your .DEF file.
  19.  
  20. //#undef AFX_DATA
  21. //#define AFX_DATA AFX_EXT_DATA
  22.  
  23. // Initialize the DLL, register the classes etc
  24. extern "C" AFX_EXT_API void WINAPI InitTestDLL1();
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // Simple Text document
  28.  
  29. class AFX_EXT_CLASS CTextDoc : public CDocument
  30. {
  31.     DECLARE_DYNCREATE(CTextDoc)
  32. protected:
  33.     void Serialize(CArchive& ar);
  34.     //{{AFX_MSG(CTextDoc)
  35.     //}}AFX_MSG
  36.     DECLARE_MESSAGE_MAP()
  37. };
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // Simple output view
  41.  
  42. class AFX_EXT_CLASS CHelloView : public CView
  43. {
  44.     DECLARE_DYNCREATE(CHelloView)
  45. public:
  46.     CHelloView();
  47.  
  48. // Implementation
  49. protected:
  50.     UINT m_nIDColor;        // last color command
  51.     COLORREF m_clrText;
  52.  
  53.     virtual void OnDraw(CDC* pDC);
  54.     // message handlers
  55.     //{{AFX_MSG(CHelloView)
  56.     afx_msg void OnColor();
  57.     afx_msg void OnCustomColor();
  58.     afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
  59.     //}}AFX_MSG
  60.  
  61.     DECLARE_MESSAGE_MAP()
  62. };
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65. // Simple do-nothing document
  66.  
  67. class AFX_EXT_CLASS CDummyDoc : public CDocument
  68. {
  69.     DECLARE_DYNCREATE(CDummyDoc)
  70. protected:
  71.     //{{AFX_MSG(CDummyDoc)
  72.     //}}AFX_MSG
  73.     DECLARE_MESSAGE_MAP()
  74. };
  75.  
  76. #undef AFX_DATA
  77. #define AFX_DATA
  78.  
  79. /////////////////////////////////////////////////////////////////////////////
  80.