CGridListCtrlEx
 All Classes Functions Variables Pages
Public Member Functions | Protected Member Functions | List of all members
CGridRowTraitXP Class Reference

CGridRowTraitXP fixes drawing of rows when the application is using classic- or XP-style. More...

Inheritance diagram for CGridRowTraitXP:
CGridRowTraitText CGridRowTrait

Public Member Functions

virtual void OnCustomDraw (CGridListCtrlEx &owner, NMLVCUSTOMDRAW *pLVCD, LRESULT *pResult)
 Overrides the custom draw handler, to allow custom coloring of rows.
 
- Public Member Functions inherited from CGridRowTraitText
 CGridRowTraitText ()
 CGridRowTraitText - Constructor.
 
void SetRowColor (COLORREF textColor, COLORREF backColor)
 Sets the same row coloring for all rows.
 
void SetAltRowColor (COLORREF textColor, COLORREF backColor)
 Activates alternate row coloring.
 
void SetInvertCellSelection (bool bValue)
 
bool GetInvertCellSelection () const
 

Protected Member Functions

virtual void Accept (CGridRowTraitVisitor &visitor)
 Accept Visitor Pattern.
 
- Protected Member Functions inherited from CGridRowTraitText
virtual bool UpdateTextColor (int nRow, COLORREF &textColor)
 Changes the text color if one is specified.
 
virtual bool UpdateBackColor (int nRow, COLORREF &backColor)
 Changes the background color if one is specified.
 

Additional Inherited Members

- Protected Attributes inherited from CGridRowTraitText
CFont * m_pOldFont
 Backup of the original font while drawing with specified font.
 
bool m_FontAllocated
 Specified font was allocated by the row trait.
 
COLORREF m_TextColor
 Text color to use for this row.
 
COLORREF m_BackColor
 Background color to use for this row.
 
COLORREF m_AltTextColor
 Alternate text color to use for every second row.
 
COLORREF m_AltBackColor
 Alternate background color to use for every second row.
 
bool m_InvertCellSelection
 When cell has focus in column, then the selection color is removed.
 

Detailed Description

CGridRowTraitXP fixes drawing of rows when the application is using classic- or XP-style.

Member Function Documentation

void CGridRowTraitXP::OnCustomDraw ( CGridListCtrlEx owner,
NMLVCUSTOMDRAW *  pLVCD,
LRESULT *  pResult 
)
virtual

Overrides the custom draw handler, to allow custom coloring of rows.

    - Fix white background for icon images
    - Fix white background between icon and cell text
Parameters
ownerThe list control drawing
pLVCDPointer to NMLVCUSTOMDRAW structure
pResultModification to the drawing stage (CDRF_NEWFONT, etc.)

Reimplemented from CGridRowTraitText.