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 / intlstvw.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  85 lines

  1. // intlstvw.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. // CIntListView form view
  15.  
  16. #ifndef __AFXEXT_H__
  17. #include <afxext.h>
  18. #endif
  19.  
  20. class CIntListView : public CFormView
  21. {
  22. public:
  23.     CIntListView();           // protected constructor used by dynamic creation
  24.     DECLARE_DYNCREATE(CIntListView)
  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(CIntListView)
  37.     enum { IDD = IDD_INT_LIST };
  38.     CListBox    m_ctlList;
  39.     int     m_int;
  40.     //}}AFX_DATA
  41.  
  42. // Attributes
  43. public:
  44.  
  45. // Operations
  46. public:
  47.  
  48. // Overrides
  49.     // ClassWizard generate virtual function overrides
  50.     //{{AFX_VIRTUAL(CIntListView)
  51.     protected:
  52.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  53.     //}}AFX_VIRTUAL
  54.  
  55.  
  56. // Implementation
  57. protected:
  58.     BOOL FindInt(int& nSel, POSITION& pos);
  59.     void AddIntToListBox(int n, int nSel = -1);
  60.  
  61.     virtual ~CIntListView();
  62. #ifdef _DEBUG
  63.     virtual void AssertValid() const;
  64.     virtual void Dump(CDumpContext& dc) const;
  65. #endif
  66.  
  67.     // Generated message map functions
  68.     //{{AFX_MSG(CIntListView)
  69.     afx_msg void OnAdd();
  70.     afx_msg void OnUpdate();
  71.     afx_msg void OnRemove();
  72.     afx_msg void OnRemoveAll();
  73.     afx_msg void OnSelChangeList();
  74.     afx_msg void OnInsertBefore();
  75.     //}}AFX_MSG
  76.     DECLARE_MESSAGE_MAP()
  77. };
  78.  
  79. #ifndef _DEBUG
  80. inline CCollectDoc* CIntListView::GetDocument()
  81.    { return (CCollectDoc*)m_pDocument; }
  82. #endif
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85.