home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / MFC / SAMPLES / DLLHUSK / TESTDLL2.H_ / TESTDLL2.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  2.1 KB  |  66 lines

  1. // TESTDLL2.H - Public API exported from 'TESTDLL2.DLL'
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992 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 Microsoft
  9. // QuickHelp and/or WinHelp documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. // Initialize the DLL, register the classes etc
  15. extern "C" extern void WINAPI InitTestDLL2();
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // This DLL exports a general purpose MDIChildWnd that can be used for
  19. //   a list output (stores data in a listbox)
  20. // All the public interfaces are exported in TESTDLL2.DEF
  21.  
  22. class CListOutputFrame : public CMDIChildWnd
  23. {
  24.     DECLARE_DYNAMIC(CListOutputFrame)
  25.  
  26. // Constructors
  27. public:
  28.     // NOTE: always export explicit constructors and destructor to be safe
  29.     CListOutputFrame();
  30.     ~CListOutputFrame();
  31.     BOOL Create(LPCSTR lpszWindowName,
  32.         DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW,
  33.         const RECT& rect = rectDefault,
  34.         CMDIFrameWnd* pParentWnd = NULL);
  35.  
  36. // Operations
  37.     void Clear();       // clears list
  38.     void AddString(LPCSTR lpszItem);        // adds to end of list
  39.     void SetBackpointer(CListOutputFrame** ppThis);
  40.  
  41. // Implementation
  42. protected:
  43.     CMenu       m_menu;         // menu to give to the the MDI Frame
  44.     CDialogBar  m_dlgBar;
  45.     CListBox    m_listBox;
  46.     CListOutputFrame** m_ppThis;  // backpointer to clear when frame destroyed
  47.     HGLOBAL GetTextData();
  48.  
  49.     //{{AFX_MSG(CListOutputFrame)
  50.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  51.     afx_msg void OnEditClear();
  52.     afx_msg void OnEditCopy();
  53.     afx_msg void OnEditCut();
  54.     //}}AFX_MSG
  55.     DECLARE_MESSAGE_MAP()
  56. };
  57.  
  58. // inlines do not need to be exported
  59. inline void CListOutputFrame::SetBackpointer(CListOutputFrame** ppThis)
  60. {
  61.     m_ppThis = ppThis;
  62. }
  63.  
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66.