You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><ahref="clistctrl_persist_state.aspx">Persist column width, position and visibility</a></li>
30
31
31
32
<li><ahref="http://www.codeproject.com/KB/shell/explorerdragdrop.aspx">OLE Drag and Drop</a> (includes reordering of items) </li>
32
-
33
33
</ul>
34
34
35
35
<p>This article demonstrates how to use <code>CGridListCtrlEx</code>, which implements all the above features while maintaining the Windows XP/Vista look.</p>
<p>The <ahref="http://code.google.com/p/cgridlistctrlex/">Google Code - CGridListCtrlEx</a> can be used if wanting SubVersion access, and there is also <ahref="http://cgridlistctrlex.googlecode.com/svn/trunk/Doxygen/html/index.html">Doxygen Documentation</a>.</p>
<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>
108
108
109
+
<prelang="C++">bool MyGridCtrl::OnDisplayCellColor(int nRow, int nCol, COLORREF& textColor, COLORREF& 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
+
109
120
<h4>Displaying Cell/Subitem Images</h4>
110
121
111
122
<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>
<li><code>CViewConfigSection</code> - Abstract interface for persisting column setup
242
251
<ul>
243
-
244
252
<li><code>CViewConfigSectionWinApp</code> - Implements the interface and can switch between multiple column setups. </li>
245
253
</ul>
246
254
</li>
@@ -351,7 +359,6 @@ <h2>History</h2>
351
359
352
360
<li><strong>Version 1.8</strong> (2010-10-01)
353
361
<ul>
354
-
355
362
<li>Made <code>CGridColumnTraitImage</code> a base class for all editor column traits, so they all can mimic checkbox support </li>
356
363
357
364
<li>Implemented multiple selection checkbox support, so checkboxes are flipped for all selected rows </li>
@@ -371,6 +378,21 @@ <h2>History</h2>
371
378
<li>Removed <code>CGridColumnManager</code> and moved <code>LoadState</code>/<code>SaveState </code>into <code>CGridListCtrlEx</code> (breaking change) </li>
372
379
</ul>
373
380
</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>
0 commit comments