protected: CFont* m_pOldItemFont; CFont* m_pOldSubItemFont; // // Callbacks for whole control // // do we want to do the drawing ourselves? virtual bool IsDraw() { return false; } // if we are doing the drawing ourselves // override and put the code in here // and return TRUE if we did indeed do // all the drawing ourselves virtual bool OnDraw(CDC* /*pDC*/, const CRect& /*r*/) { return false; } // do we want to handle custom draw for // individual items virtual bool IsNotifyItemDraw() { return false; } // do we want to be notified when the // painting has finished virtual bool IsNotifyPostPaint() { return false; } // do we want to do any drawing after // the list control is finished virtual bool IsPostDraw() { return false; } // if we are doing the drawing afterwards ourselves // override and put the code in here // the return value is not used here virtual bool OnPostDraw(CDC* /*pDC*/, const CRect& /*r*/) { return false; } // // Callbacks for each item // // return a pointer to the font to use for this item. // return NULL to use default virtual CFont* FontForItem(int /*nItem*/, UINT /*nState*/, LPARAM /*lParam*/) { return NULL; } // return the text color to use for this item // return CLR_DEFAULT to use default virtual COLORREF TextColorForItem(int /*nItem*/, UINT /*nState*/, LPARAM /*lParam*/) { return CLR_DEFAULT; } // return the background color to use for this item // return CLR_DEFAULT to use default virtual COLORREF BkColorForItem(int /*nItem*/, UINT /*nState*/, LPARAM /*lParam*/) { return CLR_DEFAULT; } // do we want to do the drawing for this item ourselves? virtual bool IsItemDraw(int /*nItem*/, UINT /*nState*/, LPARAM /*lParam*/) { return false; } // if we are doing the drawing ourselves // override and put the code in here // and return TRUE if we did indeed do // all the drawing ourselves virtual bool OnItemDraw(CDC* /*pDC*/, int /*nItem*/, UINT /*nState*/, LPARAM /*lParam*/) { return false; }

评论