Skip to content

Commit bebec7d

Browse files
committed
Updated article with version 2.0 changes
1 parent a4ed933 commit bebec7d

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

Documentation/CGridListCtrlEx.htm

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<span id="ArticleContent">
2+
23
<ul class="download">
3-
<li><a href="CGridListCtrlEx/CGridListCtrlEx.zip">Download source code - 76.96 KB</a> </li>
4+
<li><a href="cgridlistctrlex.zip">Download source code - 76.96 KB</a> </li>
45

5-
<li><a href="CGridListCtrlEx/CGridListCtrlEx_Demo.zip">Download demo - 754.33 KB</a> </li>
6+
<li><a href="cgridlistctrlex_demo.zip">Download demo - 754.33 KB</a> </li>
67
</ul>
78

89
<h2>Introduction</h2>
@@ -29,12 +30,11 @@ <h2>Introduction</h2>
2930
<li><a href="clistctrl_persist_state.aspx">Persist column width, position and visibility</a> </li>
3031

3132
<li><a href="http://www.codeproject.com/KB/shell/explorerdragdrop.aspx">OLE Drag and Drop</a> (includes reordering of items) </li>
32-
3333
</ul>
3434

3535
<p>This article demonstrates how to use <code>CGridListCtrlEx</code>, which implements all the above features while maintaining the Windows XP/Vista look.</p>
3636

37-
<p><img width="497" height="292" alt="screenshot.png" src="CGridListCtrlEx/screenshot.png" complete="true" /></p>
37+
<p><img width="497" height="292" alt="screenshot.png" src="screenshot.png" complete="true" /></p>
3838

3939
<p>The <a href="http://code.google.com/p/cgridlistctrlex/">Google Code - CGridListCtrlEx</a> can be used if wanting SubVersion access, and there is also <a href="http://cgridlistctrlex.googlecode.com/svn/trunk/Doxygen/html/index.html">Doxygen Documentation</a>.</p>
4040

@@ -106,6 +106,17 @@ <h4>Formatting Cells/Subitems</h4>
106106

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

109+
<pre lang="C++">bool MyGridCtrl::OnDisplayCellColor(int nRow, int nCol, COLORREF&amp; textColor, COLORREF&amp; backColor)
110+
{
111+
if (nRow == 3 && nCol == 3)
112+
{
113+
textColor = RGB(0,255,0);
114+
backColor = RGB(0,0,255);
115+
return true; // I want to override the color of this cell
116+
}
117+
return false; // Use default color
118+
}</pre>
119+
109120
<h4>Displaying Cell/Subitem Images</h4>
110121

111122
<p>The <code>CGridListCtrlEx</code> enables the extended style <code>LVS_EX_SUBITEMIMAGES</code> by default, but one is still required to attach a <code>CImageList</code> using <code>CListCtrl::SetImageList()</code>.</p>
@@ -214,7 +225,6 @@ <h2>Using the Code</h2>
214225
<ul>
215226
<li><code>CGridColumnTraitText</code> - Implements cell formatting
216227
<ul>
217-
218228
<li><code>CGridColumnTraitImage</code> - Implements cell editing by switching between images (can mimic a checkbox)
219229
<ul>
220230
<li><code>CGridColumnTraitEdit</code> - Implements cell editing with <code>CEdit</code> </li>
@@ -230,7 +240,6 @@ <h2>Using the Code</h2>
230240
</li>
231241

232242
<li><code>CGridRowTrait</code> - Specifies the interface of a row trait
233-
234243
<ul>
235244
<li><code>CGridRowTraitText</code> - Implements row formatting </li>
236245

@@ -240,7 +249,6 @@ <h2>Using the Code</h2>
240249

241250
<li><code>CViewConfigSection</code> - Abstract interface for persisting column setup
242251
<ul>
243-
244252
<li><code>CViewConfigSectionWinApp</code> - Implements the interface and can switch between multiple column setups. </li>
245253
</ul>
246254
</li>
@@ -351,7 +359,6 @@ <h2>History</h2>
351359

352360
<li><strong>Version 1.8</strong> (2010-10-01)
353361
<ul>
354-
355362
<li>Made <code>CGridColumnTraitImage</code> a base class for all editor column traits, so they all can mimic checkbox support </li>
356363

357364
<li>Implemented multiple selection checkbox support, so checkboxes are flipped for all selected rows </li>
@@ -371,6 +378,21 @@ <h2>History</h2>
371378
<li>Removed <code>CGridColumnManager</code> and moved <code>LoadState</code>/<code>SaveState </code>into <code>CGridListCtrlEx</code> (breaking change) </li>
372379
</ul>
373380
</li>
381+
382+
<li><strong>Version 2.0</strong> (2012-05-01)
383+
<ul>
384+
<li>Added copy/paste support for <code>CDateTimeCtrl</code> editor (<code>DTS_APPCANPARSE</code>)</li>
385+
386+
<li>When having grouped by column, then column header click now sorts instead of grouping by column</li>
387+
388+
<li>Changed the row sorting to be case insensitive by default</li>
389+
390+
<li>Fixed bug where cell editor discarded changes performed using the mouse (copy/paste using context menu)</li>
391+
392+
<li>Fixed several compiler warnings, and small bugs</li>
393+
</ul>
394+
</li>
395+
374396
</ul>
375397

376398
</span>

0 commit comments

Comments
 (0)