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

  1. // ListVwEx.h : interface of the CListViewEx class
  2. //
  3. // This class provedes a full row selection mode for the report
  4. // mode list view control.
  5. //
  6. // This is a part of the Microsoft Foundation Classes C++ library.
  7. // Copyright (C) 1992-1998 Microsoft Corporation
  8. // All rights reserved.
  9. //
  10. // This source code is only intended as a supplement to the
  11. // Microsoft Foundation Classes Reference and related
  12. // electronic documentation provided with the library.
  13. // See these sources for detailed information regarding the
  14. // Microsoft Foundation Classes product.
  15.  
  16. class CListViewEx : public CListView
  17. {
  18.     DECLARE_DYNCREATE(CListViewEx)
  19.  
  20. // Construction
  21. public:
  22.     CListViewEx();
  23.  
  24. // Attributes
  25. protected:
  26.     BOOL m_bFullRowSel;
  27.  
  28. public:
  29.     BOOL SetFullRowSel(BOOL bFillRowSel);
  30.     BOOL GetFullRowSel();
  31.  
  32.     BOOL m_bClientWidthSel;
  33.  
  34. // Overrides
  35. protected:
  36.     virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  37.  
  38.     // ClassWizard generated virtual function overrides
  39.     //{{AFX_VIRTUAL(CListViewEx)
  40.     public:
  41.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  42.     protected:
  43.     //}}AFX_VIRTUAL
  44.  
  45. // Implementation
  46. public:
  47.     virtual ~CListViewEx();
  48. #ifdef _DEBUG
  49.     virtual void Dump(CDumpContext& dc) const;
  50. #endif
  51.  
  52. protected:
  53.     static LPCTSTR MakeShortString(CDC* pDC, LPCTSTR lpszLong, int nColumnLen, int nOffset);
  54.     void RepaintSelectedItems();
  55.  
  56. // Implementation - client area width
  57.     int m_cxClient;
  58.  
  59. // Implementation - state icon width
  60.     int m_cxStateImageOffset;
  61.     afx_msg LRESULT OnSetImageList(WPARAM wParam, LPARAM lParam);
  62.  
  63. // Implementation - list view colors
  64.     COLORREF m_clrText;
  65.     COLORREF m_clrTextBk;
  66.     COLORREF m_clrBkgnd;
  67.     afx_msg LRESULT OnSetTextColor(WPARAM wParam, LPARAM lParam);
  68.     afx_msg LRESULT OnSetTextBkColor(WPARAM wParam, LPARAM lParam);
  69.     afx_msg LRESULT OnSetBkColor(WPARAM wParam, LPARAM lParam);
  70.  
  71. // Generated message map functions
  72. protected:
  73.     //{{AFX_MSG(CListViewEx)
  74.     afx_msg void OnSize(UINT nType, int cx, int cy);
  75.     afx_msg void OnPaint();
  76.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  77.     afx_msg void OnKillFocus(CWnd* pNewWnd);
  78.     //}}AFX_MSG
  79.     DECLARE_MESSAGE_MAP()
  80. };
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83.