THeaderCtrlEx.h
上传用户:maicowu
上传日期:2007-01-02
资源大小:87k
文件大小:2k
源码类别:

TreeView控件

开发平台:

Visual C++

  1. /************************************
  2.   REVISION LOG ENTRY
  3.   Revision By: Mihai Filimon
  4.   Revised on 6/20/98 2:46:45 PM
  5.   Comments: THeaderCtrlEx.h : header file
  6.  ************************************/
  7. #if !defined(AFX_THEADERCTRLEX_H__F28DAA63_E02B_11D1_85E6_0040055C08D9__INCLUDED_)
  8. #define AFX_THEADERCTRLEX_H__F28DAA63_E02B_11D1_85E6_0040055C08D9__INCLUDED_
  9. #if _MSC_VER >= 1000
  10. #pragma once
  11. #endif // _MSC_VER >= 1000
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CTHeaderCtrlEx window
  14. #include <afxtempl.h>
  15. #define SET TRUE // used in SetColumnFormat to set ownerdraw style of a column
  16. #define REMOVE FALSE // used in SetColumnFormat to remove ownerdraw style of a column
  17. class CTHeaderCtrlEx : public CHeaderCtrl
  18. {
  19. // Construction
  20. public:
  21. CTHeaderCtrlEx();
  22. // Attributes
  23. public:
  24. virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
  25. // Operations
  26. public:
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CTHeaderCtrlEx)
  30. //}}AFX_VIRTUAL
  31. // Implementation
  32. public:
  33. void ResetSortColumns(BOOL bInvalidate = true);
  34. BOOL GetPositionColumn(int nPosition, BOOL & bAsc, int & nColumn) const;
  35. BOOL GetColumnOrder(int nColumn, BOOL & bAsc, int & nPosition) const;
  36. BOOL SetColumnOrder(int iColumn, BOOL bAsc = TRUE);
  37. void DeleteColumnOrder(int iColumn);
  38. virtual ~CTHeaderCtrlEx();
  39. // Generated message map functions
  40. protected:
  41. CMap <int,int, WORD, WORD> m_mapSortColumns; // contain sort columns
  42. //{{AFX_MSG(CTHeaderCtrlEx)
  43. //}}AFX_MSG
  44. DECLARE_MESSAGE_MAP()
  45. private:
  46. void SignMoreSortColumns(CDC & dc, int nPosition,  CRect& rectWhere);
  47. void SetColumnFormat(int iColumn, int format, BOOL bOr = SET);
  48. int m_nLastPosition;
  49. };
  50. /////////////////////////////////////////////////////////////////////////////
  51. //{{AFX_INSERT_LOCATION}}
  52. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  53. #endif // !defined(AFX_THEADERCTRLEX_H__F28DAA63_E02B_11D1_85E6_0040055C08D9__INCLUDED_)