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

  1. // RListVw.h : interface of the CRowListView class
  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. class CRowListView : public CListViewEx
  14. {
  15. protected: // create from serialization only
  16.     CRowListView();
  17.     DECLARE_DYNCREATE(CRowListView)
  18.  
  19. // Attributes
  20. public:
  21.     CRowListDoc* GetDocument();
  22.  
  23. // Operations
  24. public:
  25.  
  26. // Overrides
  27.     // ClassWizard generated virtual function overrides
  28.     //{{AFX_VIRTUAL(CRowListView)
  29.     public:
  30.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  31.     protected:
  32.     virtual void OnInitialUpdate(); // called first time after construct
  33.     //}}AFX_VIRTUAL
  34.  
  35. // Implementation
  36. public:
  37.     virtual ~CRowListView();
  38. #ifdef _DEBUG
  39.     virtual void AssertValid() const;
  40.     virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42.  
  43. protected:
  44.  
  45. // Generated message map functions
  46. protected:
  47.     //{{AFX_MSG(CRowListView)
  48.     afx_msg void OnViewSmallIcons();
  49.     afx_msg void OnViewLargeIcons();
  50.     afx_msg void OnViewList();
  51.     afx_msg void OnViewDetails();
  52.     afx_msg void OnViewFullRowDetails();
  53.     afx_msg void OnUpdateViewSmallIcons(CCmdUI* pCmdUI);
  54.     afx_msg void OnUpdateViewLargeIcons(CCmdUI* pCmdUI);
  55.     afx_msg void OnUpdateViewList(CCmdUI* pCmdUI);
  56.     afx_msg void OnUpdateViewDetails(CCmdUI* pCmdUI);
  57.     afx_msg void OnUpdateViewFullRowDetails(CCmdUI* pCmdUI);
  58.     afx_msg void OnViewStateIcons();
  59.     afx_msg void OnUpdateViewStateIcons(CCmdUI* pCmdUI);
  60.     afx_msg void OnViewClientWidthSel();
  61.     afx_msg void OnUpdateViewClientWidthSel(CCmdUI* pCmdUI);
  62.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  63.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  64.     //}}AFX_MSG
  65.     DECLARE_MESSAGE_MAP()
  66.  
  67. // list view image lists
  68. protected:
  69.     CImageList m_LargeImageList;
  70.     CImageList m_SmallImageList;
  71.     CImageList m_StateImageList;
  72.  
  73. // view type helpers
  74. public:
  75.     BOOL SetViewType(DWORD dwViewType);
  76.     DWORD GetViewType();
  77.  
  78. // flags and states
  79. protected:
  80.     BOOL m_bStateIcons;
  81.     int m_nCheckedItem;
  82.     HICON m_hSmallIcon;
  83.     HICON m_hLargeIcon;
  84.  
  85.     void CheckItem(int nNewCheckedItem);
  86. };
  87.  
  88. #ifndef _DEBUG  // debug version in RListVw.cpp
  89. inline CRowListDoc* CRowListView::GetDocument()
  90.    { return (CRowListDoc*)m_pDocument; }
  91. #endif
  92.  
  93. /////////////////////////////////////////////////////////////////////////////
  94.