123456789101112131415161718192021222324252627282930313233 |
- #ifndef __SORTHEADERCTRL__
- #define __SORTHEADERCTRL__
- class CSortHeaderCtrl : public CHeaderCtrl
- {
- public:
- CSortHeaderCtrl();
- virtual ~CSortHeaderCtrl();
- public:
- virtual void Serialize(CArchive& ar);
- void SetTextColor(COLORREF clrText) { m_clrText = clrText;}
- void SetFillRectColor(COLORREF clrFillRect) { m_clrFillRect = clrFillRect;}
- void Set3DRectColor(COLORREF clrTopLeft, COLORREF clrBottomRight) {m_clrTopLeft = clrTopLeft; m_clrBottomRight = clrBottomRight;}
- void SetSortArrow( const int nColumn, const BOOL bAscending );
- protected:
- void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
- afx_msg void OnPaint();
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- int m_nSortColumn;
- BOOL m_bSortAscending;
- COLORREF m_clrText; // 文本颜色;
- COLORREF m_clrTopLeft; // 3D 上、左边框颜色;
- COLORREF m_clrBottomRight; // 3D 下、右边框颜色;
- COLORREF m_clrFillRect; // 填充矩形的颜色;
- DECLARE_MESSAGE_MAP()
- };
- #endif // __SORTHEADERCTRL__
|