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

  1. // typlstvw.h : header file
  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. /////////////////////////////////////////////////////////////////////////////
  14. // CTypedPtrListView form view
  15.  
  16. #ifndef __AFXEXT_H__
  17. #include <afxext.h>
  18. #endif
  19.  
  20. class CTypedPtrListView : public CFormView
  21. {
  22. public:
  23.     CTypedPtrListView();           // protected constructor used by dynamic creation
  24.     DECLARE_DYNCREATE(CTypedPtrListView)
  25.  
  26. // Attributes
  27. public:
  28.     CCollectDoc* GetDocument();
  29.  
  30. // Overrides
  31. public:
  32.     void OnInitialUpdate();
  33.  
  34. // Form Data
  35. public:
  36.     //{{AFX_DATA(CTypedPtrListView)
  37.     enum { IDD = IDD_TYPED_PTR_LIST };
  38.     CListBox    m_ctlList;
  39.     float   m_float;
  40.     int     m_int;
  41.     CString m_str;
  42.     //}}AFX_DATA
  43.  
  44. // Implementation
  45. protected:
  46.     CMyStruct* FindMyStruct(int& nSel, POSITION& pos);
  47.     void AddMyStructToListBox(CMyStruct* pMyStruct, int nSel = -1);
  48.  
  49. // Overrides
  50.     // ClassWizard generate virtual function overrides
  51.     //{{AFX_VIRTUAL(CTypedPtrListView)
  52.     protected:
  53.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  54.     //}}AFX_VIRTUAL
  55.  
  56. // Implementation
  57. protected:
  58.     virtual ~CTypedPtrListView();
  59. #ifdef _DEBUG
  60.     virtual void AssertValid() const;
  61.     virtual void Dump(CDumpContext& dc) const;
  62. #endif
  63.  
  64.     // Generated message map functions
  65.     //{{AFX_MSG(CTypedPtrListView)
  66.     afx_msg void OnAdd();
  67.     afx_msg void OnUpdate();
  68.     afx_msg void OnRemove();
  69.     afx_msg void OnRemoveAll();
  70.     afx_msg void OnSelChangeList();
  71.     afx_msg void OnInsertBefore();
  72.     //}}AFX_MSG
  73.     DECLARE_MESSAGE_MAP()
  74. };
  75.  
  76. #ifndef _DEBUG
  77. inline CCollectDoc* CTypedPtrListView::GetDocument()
  78.    { return (CCollectDoc*)m_pDocument; }
  79. #endif
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82.