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

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