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

  1. // strlstvw.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. // CStringListView form view
  15.  
  16. #ifndef __AFXEXT_H__
  17. #include <afxext.h>
  18. #endif
  19.  
  20. class CStringListView : public CFormView
  21. {
  22. public:
  23.     CStringListView();           // protected constructor used by dynamic creation
  24.     DECLARE_DYNCREATE(CStringListView)
  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(CStringListView)
  37.     enum { IDD = IDD_STRING_LIST };
  38.     CListBox    m_ctlList;
  39.     CString m_strElement;
  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(CStringListView)
  51.     protected:
  52.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  53.     //}}AFX_VIRTUAL
  54.  
  55. // Implementation
  56. protected:
  57.     BOOL FindString(int& nSel, POSITION& pos);
  58.  
  59.     virtual ~CStringListView();
  60. #ifdef _DEBUG
  61.     virtual void AssertValid() const;
  62.     virtual void Dump(CDumpContext& dc) const;
  63. #endif
  64.  
  65.     // Generated message map functions
  66.     //{{AFX_MSG(CStringListView)
  67.     afx_msg void OnAdd();
  68.     afx_msg void OnRemove();
  69.     afx_msg void OnRemoveAll();
  70.     afx_msg void OnUpdateElement();
  71.     afx_msg void OnSelChangeList();
  72.     afx_msg void OnInsertBefore();
  73.     //}}AFX_MSG
  74.     DECLARE_MESSAGE_MAP()
  75. };
  76.  
  77. #ifndef _DEBUG
  78. inline CCollectDoc* CStringListView::GetDocument()
  79.    { return (CCollectDoc*)m_pDocument; }
  80. #endif
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83.