Click here to Skip to main content
14,216,467 members
Click here to Skip to main content

Stats

2.2M views
59K downloads
447 bookmarked

CGridListCtrlEx - Grid Control Based on CListCtrl

,
Rate this:
4.90 (130 votes)
Please Sign up or sign in to vote.
4.90 (130 votes)
16 Mar 2015     CPOL    
A custom draw CListCtrl with subitem editing and formatting
CGridListCtrlEx
DemoApplication
res
CGridListCtrlEx.ico
FLGDEN.ICO
FLGFRAN.ICO
FLGGERM.ICO
FLGGREEC.ico
FLGSPAIN.ICO
FLGSWED.ICO
Documentation
CGridListCtrlEx
screenshot.png
vs2003
CGridListCtrlEx.vcproj
vs2005
CGridListCtrlEx.vcproj
vs2008
CGridListCtrlEx.vcproj
vs6
CGridListCtrlEx.dsp
CGridListCtrlEx.dsw
Release
CGridListCtrlEx.exe
msvcp120.dll
msvcr120.dll
CGridListCtrlEx.ico
FLGDEN.ICO
FLGFRAN.ICO
FLGGERM.ICO
FLGGREEC.ico
FLGSPAIN.ICO
FLGSWED.ICO
screenshot.png
Doxygen
Doxyfile
html
arrowdown.png
arrowright.png
bc_s.png
bdwn.png
class_c_grid_column_trait.png
class_c_grid_column_trait_combo.png
class_c_grid_column_trait_date_time.png
class_c_grid_column_trait_edit.png
class_c_grid_column_trait_hyper_link.png
class_c_grid_column_trait_image.png
class_c_grid_column_trait_multiline_edit.png
class_c_grid_column_trait_text.png
class_c_grid_editor_combo_box.png
class_c_grid_editor_combo_box_edit.png
class_c_grid_editor_date_time_ctrl.png
class_c_grid_editor_text.png
class_c_grid_list_ctrl_ex.png
class_c_grid_list_ctrl_groups.png
class_c_grid_multiline_editor_text.png
class_c_grid_row_trait.png
class_c_grid_row_trait_text.png
class_c_grid_row_trait_x_p.png
class_c_view_config_section.png
class_c_view_config_section_default.png
class_c_view_config_section_default_1_1_c_view_config_section_local.png
class_c_view_config_section_profiles.png
class_c_view_config_section_win_app.png
closed.png
doc.png
doxygen.png
folderclosed.png
folderopen.png
ftv2blank.png
ftv2cl.png
ftv2doc.png
ftv2folderclosed.png
ftv2folderopen.png
ftv2lastnode.png
ftv2link.png
ftv2mlastnode.png
ftv2mnode.png
ftv2mo.png
ftv2node.png
ftv2ns.png
ftv2plastnode.png
ftv2pnode.png
ftv2splitbar.png
ftv2vertline.png
nav_f.png
nav_g.png
nav_h.png
open.png
search
close.png
mag_sel.png
search_l.png
search_m.png
search_r.png
splitbar.png
sync_off.png
sync_on.png
tab_a.png
tab_b.png
tab_h.png
tab_s.png
CGridListCtrlEx.vcproj
CGridListCtrlEx.vcproj
CGridListCtrlEx.vcproj
CGridListCtrlEx.dsp
CGridListCtrlEx.dsw
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>CGridListCtrlEx: CGridRowTraitText Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CGridListCtrlEx
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_c_grid_row_trait_text-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CGridRowTraitText Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_c_grid_row_trait_text.html" title="CGridRowTraitText provides customization text and background at row-level. ">CGridRowTraitText</a> provides customization text and background at row-level.  
 <a href="class_c_grid_row_trait_text.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for CGridRowTraitText:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_c_grid_row_trait_text.png" usemap="#CGridRowTraitText_map" alt=""/>
  <map id="CGridRowTraitText_map" name="CGridRowTraitText_map">
<area href="class_c_grid_row_trait.html" title="CGridRowTrait specifies an interface for handling custom drawing at row-level. " alt="CGridRowTrait" shape="rect" coords="0,0,117,24"/>
<area href="class_c_grid_row_trait_x_p.html" title="CGridRowTraitXP fixes drawing of rows when the application is using classic- or XP-style. " alt="CGridRowTraitXP" shape="rect" coords="0,112,117,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6b69756bc381bd68ac45ef8b3cce99b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6b69756bc381bd68ac45ef8b3cce99b3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a6b69756bc381bd68ac45ef8b3cce99b3">CGridRowTraitText</a> ()</td></tr>
<tr class="memdesc:a6b69756bc381bd68ac45ef8b3cce99b3"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_c_grid_row_trait_text.html" title="CGridRowTraitText provides customization text and background at row-level. ">CGridRowTraitText</a> - Constructor. <br /></td></tr>
<tr class="separator:a6b69756bc381bd68ac45ef8b3cce99b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac74b376ccd1d771f82de85ad3f685b66"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#ac74b376ccd1d771f82de85ad3f685b66">OnCustomDraw</a> (<a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;owner, NMLVCUSTOMDRAW *pLVCD, LRESULT *pResult)</td></tr>
<tr class="memdesc:ac74b376ccd1d771f82de85ad3f685b66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overrides the custom draw handler, to allow custom coloring of rows.  <a href="#ac74b376ccd1d771f82de85ad3f685b66">More...</a><br /></td></tr>
<tr class="separator:ac74b376ccd1d771f82de85ad3f685b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37b7f29aa4c94e4750323a57ec269310"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a37b7f29aa4c94e4750323a57ec269310">SetRowColor</a> (COLORREF textColor, COLORREF backColor)</td></tr>
<tr class="memdesc:a37b7f29aa4c94e4750323a57ec269310"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the same row coloring for all rows.  <a href="#a37b7f29aa4c94e4750323a57ec269310">More...</a><br /></td></tr>
<tr class="separator:a37b7f29aa4c94e4750323a57ec269310"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad61f1bc02fc5cddb979926b4aa8f0bab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#ad61f1bc02fc5cddb979926b4aa8f0bab">SetAltRowColor</a> (COLORREF textColor, COLORREF backColor)</td></tr>
<tr class="memdesc:ad61f1bc02fc5cddb979926b4aa8f0bab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activates alternate row coloring.  <a href="#ad61f1bc02fc5cddb979926b4aa8f0bab">More...</a><br /></td></tr>
<tr class="separator:ad61f1bc02fc5cddb979926b4aa8f0bab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0ccc39b5efbe7d211515b80a8cb596b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0ccc39b5efbe7d211515b80a8cb596b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetInvertCellSelection</b> (bool bValue)</td></tr>
<tr class="separator:af0ccc39b5efbe7d211515b80a8cb596b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e65990fd030e90f6914130f6daf5b7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e65990fd030e90f6914130f6daf5b7f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>GetInvertCellSelection</b> () const </td></tr>
<tr class="separator:a6e65990fd030e90f6914130f6daf5b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a2f0da7a1cfa5677dca654fb1bc821f19"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a2f0da7a1cfa5677dca654fb1bc821f19">UpdateTextColor</a> (int nRow, COLORREF &amp;textColor)</td></tr>
<tr class="memdesc:a2f0da7a1cfa5677dca654fb1bc821f19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the text color if one is specified.  <a href="#a2f0da7a1cfa5677dca654fb1bc821f19">More...</a><br /></td></tr>
<tr class="separator:a2f0da7a1cfa5677dca654fb1bc821f19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a313ee25248ac19e030ac4e8081973ce5"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a313ee25248ac19e030ac4e8081973ce5">UpdateBackColor</a> (int nRow, COLORREF &amp;backColor)</td></tr>
<tr class="memdesc:a313ee25248ac19e030ac4e8081973ce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the background color if one is specified.  <a href="#a313ee25248ac19e030ac4e8081973ce5">More...</a><br /></td></tr>
<tr class="separator:a313ee25248ac19e030ac4e8081973ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ad5abd2c6b8696b9929bc282e32236d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ad5abd2c6b8696b9929bc282e32236d"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a7ad5abd2c6b8696b9929bc282e32236d">Accept</a> (<a class="el" href="class_c_grid_row_trait_visitor.html">CGridRowTraitVisitor</a> &amp;visitor)</td></tr>
<tr class="memdesc:a7ad5abd2c6b8696b9929bc282e32236d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept Visitor Pattern. <br /></td></tr>
<tr class="separator:a7ad5abd2c6b8696b9929bc282e32236d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a1e84a7a961f10316706d73098bd101bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e84a7a961f10316706d73098bd101bf"></a>
CFont *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a1e84a7a961f10316706d73098bd101bf">m_pOldFont</a></td></tr>
<tr class="memdesc:a1e84a7a961f10316706d73098bd101bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Backup of the original font while drawing with specified font. <br /></td></tr>
<tr class="separator:a1e84a7a961f10316706d73098bd101bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e914d53ec3f4827cede0b5070d7cbf7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e914d53ec3f4827cede0b5070d7cbf7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a5e914d53ec3f4827cede0b5070d7cbf7">m_FontAllocated</a></td></tr>
<tr class="memdesc:a5e914d53ec3f4827cede0b5070d7cbf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specified font was allocated by the row trait. <br /></td></tr>
<tr class="separator:a5e914d53ec3f4827cede0b5070d7cbf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1763e6271378ae4b6d278df3a6862c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af1763e6271378ae4b6d278df3a6862c9"></a>
COLORREF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#af1763e6271378ae4b6d278df3a6862c9">m_TextColor</a></td></tr>
<tr class="memdesc:af1763e6271378ae4b6d278df3a6862c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Text color to use for this row. <br /></td></tr>
<tr class="separator:af1763e6271378ae4b6d278df3a6862c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afccc68578ec0a5fe2dff64a67e9fd73b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afccc68578ec0a5fe2dff64a67e9fd73b"></a>
COLORREF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#afccc68578ec0a5fe2dff64a67e9fd73b">m_BackColor</a></td></tr>
<tr class="memdesc:afccc68578ec0a5fe2dff64a67e9fd73b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Background color to use for this row. <br /></td></tr>
<tr class="separator:afccc68578ec0a5fe2dff64a67e9fd73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a11346f8cb7f87491fdbf559a125f16"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a11346f8cb7f87491fdbf559a125f16"></a>
COLORREF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a3a11346f8cb7f87491fdbf559a125f16">m_AltTextColor</a></td></tr>
<tr class="memdesc:a3a11346f8cb7f87491fdbf559a125f16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alternate text color to use for every second row. <br /></td></tr>
<tr class="separator:a3a11346f8cb7f87491fdbf559a125f16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a636e396d45bea4b2ddbb3fe911b72173"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a636e396d45bea4b2ddbb3fe911b72173"></a>
COLORREF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a636e396d45bea4b2ddbb3fe911b72173">m_AltBackColor</a></td></tr>
<tr class="memdesc:a636e396d45bea4b2ddbb3fe911b72173"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alternate background color to use for every second row. <br /></td></tr>
<tr class="separator:a636e396d45bea4b2ddbb3fe911b72173"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0df4506d4ed4b83054b0a533014fb237"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0df4506d4ed4b83054b0a533014fb237"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_row_trait_text.html#a0df4506d4ed4b83054b0a533014fb237">m_InvertCellSelection</a></td></tr>
<tr class="memdesc:a0df4506d4ed4b83054b0a533014fb237"><td class="mdescLeft">&#160;</td><td class="mdescRight">When cell has focus in column, then the selection color is removed. <br /></td></tr>
<tr class="separator:a0df4506d4ed4b83054b0a533014fb237"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_c_grid_row_trait_text.html" title="CGridRowTraitText provides customization text and background at row-level. ">CGridRowTraitText</a> provides customization text and background at row-level. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac74b376ccd1d771f82de85ad3f685b66"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CGridRowTraitText::OnCustomDraw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;&#160;</td>
          <td class="paramname"><em>owner</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">NMLVCUSTOMDRAW *&#160;</td>
          <td class="paramname"><em>pLVCD</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LRESULT *&#160;</td>
          <td class="paramname"><em>pResult</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Overrides the custom draw handler, to allow custom coloring of rows. </p>
<ul>
<li>Focus rectangle display</li>
<li>Use font size to increase row-height, but keep cell font-size</li>
<li>Alternate row coloring</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The list control drawing </td></tr>
    <tr><td class="paramname">pLVCD</td><td>Pointer to NMLVCUSTOMDRAW structure </td></tr>
    <tr><td class="paramname">pResult</td><td>Modification to the drawing stage (CDRF_NEWFONT, etc.) </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="class_c_grid_row_trait.html#acf25dc7ebf88bdf25f1456685ca60f58">CGridRowTrait</a>.</p>

<p>Reimplemented in <a class="el" href="class_c_grid_row_trait_x_p.html#a44b832a05e8a93d3575718ba7af825dd">CGridRowTraitXP</a>.</p>

</div>
</div>
<a class="anchor" id="ad61f1bc02fc5cddb979926b4aa8f0bab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CGridRowTraitText::SetAltRowColor </td>
          <td>(</td>
          <td class="paramtype">COLORREF&#160;</td>
          <td class="paramname"><em>textColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">COLORREF&#160;</td>
          <td class="paramname"><em>backColor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Activates alternate row coloring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">backColor</td><td>The background color to use for every second row </td></tr>
    <tr><td class="paramname">textColor</td><td>The text color to use for every second row </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a37b7f29aa4c94e4750323a57ec269310"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CGridRowTraitText::SetRowColor </td>
          <td>(</td>
          <td class="paramtype">COLORREF&#160;</td>
          <td class="paramname"><em>textColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">COLORREF&#160;</td>
          <td class="paramname"><em>backColor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the same row coloring for all rows. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">backColor</td><td>The background color to use for all rows </td></tr>
    <tr><td class="paramname">textColor</td><td>The text color to use for all rows </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a313ee25248ac19e030ac4e8081973ce5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CGridRowTraitText::UpdateBackColor </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">COLORREF &amp;&#160;</td>
          <td class="paramname"><em>backColor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Changes the background color if one is specified. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nRow</td><td>The index of the row </td></tr>
    <tr><td class="paramname">backColor</td><td>Current background color </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>New background color was specified (true / false) </dd></dl>

</div>
</div>
<a class="anchor" id="a2f0da7a1cfa5677dca654fb1bc821f19"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CGridRowTraitText::UpdateTextColor </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">COLORREF &amp;&#160;</td>
          <td class="paramname"><em>textColor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Changes the text color if one is specified. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nRow</td><td>The index of the row </td></tr>
    <tr><td class="paramname">textColor</td><td>Current text color </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>New text color was specified (true / false) </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Rolf Kristensen
Software Developer
Denmark Denmark
No Biography provided