diff --git a/Documentation/CGridListCtrlEx.htm b/Documentation/CGridListCtrlEx.htm index d1308c4f..64ccb895 100644 --- a/Documentation/CGridListCtrlEx.htm +++ b/Documentation/CGridListCtrlEx.htm @@ -1,8 +1,9 @@ +

Introduction

@@ -29,12 +30,11 @@

Introduction

  • Persist column width, position and visibility
  • OLE Drag and Drop (includes reordering of items)
  • -

    This article demonstrates how to use CGridListCtrlEx, which implements all the above features while maintaining the Windows XP/Vista look.

    -

    screenshot.png

    +

    screenshot.png

    The Google Code - CGridListCtrlEx can be used if wanting SubVersion access, and there is also Doxygen Documentation.

    @@ -106,6 +106,17 @@

    Formatting Cells/Subitems

    If we want to change the foreground/background color or the font style (bold, italic, underline), then we can override the methods CGridListCtrlEx::OnDisplayCellColor() and CGridListCtrlEx::OnDisplayCellFont().

    +
    bool MyGridCtrl::OnDisplayCellColor(int nRow, int nCol, COLORREF& textColor, COLORREF& backColor)
    +{
    +   if (nRow == 3 && nCol == 3)
    +   {
    +      textColor = RGB(0,255,0);
    +      backColor = RGB(0,0,255);
    +      return true;  // I want to override the color of this cell
    +   }
    +   return false;  // Use default color
    +}
    +

    Displaying Cell/Subitem Images

    The CGridListCtrlEx enables the extended style LVS_EX_SUBITEMIMAGES by default, but one is still required to attach a CImageList using CListCtrl::SetImageList().

    @@ -214,7 +225,6 @@

    Using the Code