Click here to Skip to main content
13,706,897 members
Click here to Skip to main content

Stats

1.9M views
55.8K downloads
445 bookmarked
Posted 3 Sep 2008
Licenced CPOL

CGridListCtrlEx - Grid Control Based on CListCtrl

, 16 Mar 2015
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: CGridColumnTrait 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="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_c_grid_column_trait-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CGridColumnTrait Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_c_grid_column_trait.html" title="CGridColumnTrait specifies the methods needed for custom cell handling. ">CGridColumnTrait</a> specifies the methods needed for custom cell handling.  
 <a href="class_c_grid_column_trait.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for CGridColumnTrait:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_c_grid_column_trait.png" usemap="#CGridColumnTrait_map" alt=""/>
  <map id="CGridColumnTrait_map" name="CGridColumnTrait_map">
<area href="class_c_grid_column_trait_text.html" title="CGridColumnTraitText provides customization of cell text and background. " alt="CGridColumnTraitText" shape="rect" coords="285,56,465,80"/>
<area href="class_c_grid_column_trait_image.html" title="CGridColumnTraitImage implements an image switcher (can mimic a checkbox) " alt="CGridColumnTraitImage" shape="rect" coords="285,112,465,136"/>
<area href="class_c_grid_column_trait_combo.html" title="CGridColumnTraitCombo implements a CComboBox as cell-editor. " alt="CGridColumnTraitCombo" shape="rect" coords="0,168,180,192"/>
<area href="class_c_grid_column_trait_date_time.html" title="CGridColumnTraitDateTime implements a CDateTimeCtrl as cell-editor. " alt="CGridColumnTraitDateTime" shape="rect" coords="190,168,370,192"/>
<area href="class_c_grid_column_trait_edit.html" title="CGridColumnTraitEdit implements a CEdit as cell-editor. " alt="CGridColumnTraitEdit" shape="rect" coords="380,168,560,192"/>
<area href="class_c_grid_column_trait_hyper_link.html" title="CGridColumnTraitHyperLink that can launch a link using the web-browser. " alt="CGridColumnTraitHyperLink" shape="rect" coords="570,168,750,192"/>
<area href="class_c_grid_column_trait_multiline_edit.html" title="CGridColumnTraitMultilineEdit implements a CEdit as multiline cell-editor. " alt="CGridColumnTraitMultilineEdit" shape="rect" coords="380,224,560,248"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_c_grid_column_trait_1_1_column_state.html">ColumnState</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a8bf453ce4cefaea941fc0fd792f7dfb1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bf453ce4cefaea941fc0fd792f7dfb1"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a8bf453ce4cefaea941fc0fd792f7dfb1">~CGridColumnTrait</a> ()</td></tr>
<tr class="memdesc:a8bf453ce4cefaea941fc0fd792f7dfb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a8bf453ce4cefaea941fc0fd792f7dfb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acafacfe30da0504e9583e58d5a4857e9"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#acafacfe30da0504e9583e58d5a4857e9">OnInsertColumn</a> (<a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;owner, int nCol)</td></tr>
<tr class="memdesc:acafacfe30da0504e9583e58d5a4857e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#acafacfe30da0504e9583e58d5a4857e9" title="Override OnInsertColumn() to provide your own special styling of the column, after column has been ad...">OnInsertColumn()</a> to provide your own special styling of the column, after column has been added.  <a href="#acafacfe30da0504e9583e58d5a4857e9">More...</a><br /></td></tr>
<tr class="separator:acafacfe30da0504e9583e58d5a4857e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3ae6a1a52c2d96f0f122d5af37eb17e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#ad3ae6a1a52c2d96f0f122d5af37eb17e">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:ad3ae6a1a52c2d96f0f122d5af37eb17e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#ad3ae6a1a52c2d96f0f122d5af37eb17e" title="Override OnCustomDraw() to provide your own special cell-drawing. ">OnCustomDraw()</a> to provide your own special cell-drawing.  <a href="#ad3ae6a1a52c2d96f0f122d5af37eb17e">More...</a><br /></td></tr>
<tr class="separator:ad3ae6a1a52c2d96f0f122d5af37eb17e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d6a621ea236708a4a0aa823a6f6a9b4"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a6d6a621ea236708a4a0aa823a6f6a9b4">OnClickEditStart</a> (<a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;owner, int nRow, int nCol, CPoint pt, bool bDblClick)</td></tr>
<tr class="memdesc:a6d6a621ea236708a4a0aa823a6f6a9b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#a6d6a621ea236708a4a0aa823a6f6a9b4" title="Override OnClickEditStart() to control whether cell edit should be started when clicked with the mous...">OnClickEditStart()</a> to control whether cell edit should be started when clicked with the mouse.  <a href="#a6d6a621ea236708a4a0aa823a6f6a9b4">More...</a><br /></td></tr>
<tr class="separator:a6d6a621ea236708a4a0aa823a6f6a9b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab39126ae5476356c25166c2f08a3d8a2"><td class="memItemLeft" align="right" valign="top">virtual CWnd *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#ab39126ae5476356c25166c2f08a3d8a2">OnEditBegin</a> (<a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;owner, int nRow, int nCol)</td></tr>
<tr class="memdesc:ab39126ae5476356c25166c2f08a3d8a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#ab39126ae5476356c25166c2f08a3d8a2" title="Override OnEditBegin() to provide your own special cell-edit control. ">OnEditBegin()</a> to provide your own special cell-edit control.  <a href="#ab39126ae5476356c25166c2f08a3d8a2">More...</a><br /></td></tr>
<tr class="separator:ab39126ae5476356c25166c2f08a3d8a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76ae73e830f71f63dacc7529125435a1"><td class="memItemLeft" align="right" valign="top">virtual CWnd *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a76ae73e830f71f63dacc7529125435a1">OnEditBegin</a> (<a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;owner, int nRow, int nCol, CPoint pt)</td></tr>
<tr class="memdesc:a76ae73e830f71f63dacc7529125435a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#ab39126ae5476356c25166c2f08a3d8a2" title="Override OnEditBegin() to provide your own special cell-edit control. ">OnEditBegin()</a> to provide your own special cell-edit control.  <a href="#a76ae73e830f71f63dacc7529125435a1">More...</a><br /></td></tr>
<tr class="separator:a76ae73e830f71f63dacc7529125435a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96c3d95ac2e528f4efe40775f9585e0d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96c3d95ac2e528f4efe40775f9585e0d"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a96c3d95ac2e528f4efe40775f9585e0d">OnEditEnd</a> ()</td></tr>
<tr class="memdesc:a96c3d95ac2e528f4efe40775f9585e0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#a96c3d95ac2e528f4efe40775f9585e0d" title="Override OnEditEnd() in case one need to change state after a cell-edit. ">OnEditEnd()</a> in case one need to change state after a cell-edit. <br /></td></tr>
<tr class="separator:a96c3d95ac2e528f4efe40775f9585e0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b477cc5ceae8a47babf94b4478ed048"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a1b477cc5ceae8a47babf94b4478ed048">OnSortRows</a> (const LVITEM &amp;leftItem, const LVITEM &amp;rightItem, bool bAscending)</td></tr>
<tr class="memdesc:a1b477cc5ceae8a47babf94b4478ed048"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#a1b477cc5ceae8a47babf94b4478ed048" title="Override OnSortRows() to provide your own special row sorting. ">OnSortRows()</a> to provide your own special row sorting.  <a href="#a1b477cc5ceae8a47babf94b4478ed048">More...</a><br /></td></tr>
<tr class="separator:a1b477cc5ceae8a47babf94b4478ed048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3d1fc0f5e0f41a985bffedfec3eb30"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a2e3d1fc0f5e0f41a985bffedfec3eb30">OnSortRows</a> (LPCTSTR pszLeftValue, LPCTSTR pszRightValue, bool bAscending)</td></tr>
<tr class="memdesc:a2e3d1fc0f5e0f41a985bffedfec3eb30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#a1b477cc5ceae8a47babf94b4478ed048" title="Override OnSortRows() to provide your own special row sorting. ">OnSortRows()</a> to provide your own special row sorting.  <a href="#a2e3d1fc0f5e0f41a985bffedfec3eb30">More...</a><br /></td></tr>
<tr class="separator:a2e3d1fc0f5e0f41a985bffedfec3eb30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ea765aad5a3b38748515404867ffffd"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#a3ea765aad5a3b38748515404867ffffd">Accept</a> (<a class="el" href="class_c_grid_column_trait_visitor.html">CGridColumnTraitVisitor</a> &amp;visitor)</td></tr>
<tr class="memdesc:a3ea765aad5a3b38748515404867ffffd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#a3ea765aad5a3b38748515404867ffffd" title="Override Accept() and update CGridColumnTraitVisitor for new column-trait classes. ">Accept()</a> and update <a class="el" href="class_c_grid_column_trait_visitor.html" title="CGridColumnTraitVisitor enables the use of the visitor-pattern to add extra behavior to the CGridColu...">CGridColumnTraitVisitor</a> for new column-trait classes.  <a href="#a3ea765aad5a3b38748515404867ffffd">More...</a><br /></td></tr>
<tr class="separator:a3ea765aad5a3b38748515404867ffffd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad381f010d27330d143bdd354a048dcc4"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_grid_column_trait.html#ad381f010d27330d143bdd354a048dcc4">IsCellReadOnly</a> (<a class="el" href="class_c_grid_list_ctrl_ex.html">CGridListCtrlEx</a> &amp;owner, int nRow, int nCol, CPoint pt) const </td></tr>
<tr class="memdesc:ad381f010d27330d143bdd354a048dcc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override <a class="el" href="class_c_grid_column_trait.html#ad381f010d27330d143bdd354a048dcc4" title="Override IsCellReadOnly() to provide custom control whether a cell can be edited. ...">IsCellReadOnly()</a> to provide custom control whether a cell can be edited.  <a href="#ad381f010d27330d143bdd354a048dcc4">More...</a><br /></td></tr>
<tr class="separator:ad381f010d27330d143bdd354a048dcc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f0f3772b799dac2b99a8d1e017fffd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f0f3772b799dac2b99a8d1e017fffd9"></a>
<a class="el" href="struct_c_grid_column_trait_1_1_column_state.html">ColumnState</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetColumnState</b> ()</td></tr>
<tr class="separator:a9f0f3772b799dac2b99a8d1e017fffd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80ecf9bb5d5e42a2dd5b94e229af50a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80ecf9bb5d5e42a2dd5b94e229af50a9"></a>
BOOL&#160;</td><td class="memItemRight" valign="bottom"><b>HasMetaFlag</b> (DWORD flag)</td></tr>
<tr class="separator:a80ecf9bb5d5e42a2dd5b94e229af50a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae31096ed14e4c8efda2346eb68b1c4d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae31096ed14e4c8efda2346eb68b1c4d7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetMetaFlag</b> (DWORD flag, bool enable)</td></tr>
<tr class="separator:ae31096ed14e4c8efda2346eb68b1c4d7"><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:a639b58aea46f3539d7ef29683c4788ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a639b58aea46f3539d7ef29683c4788ca"></a>
<a class="el" href="struct_c_grid_column_trait_1_1_column_state.html">ColumnState</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_ColumnState</b></td></tr>
<tr class="separator:a639b58aea46f3539d7ef29683c4788ca"><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_column_trait.html" title="CGridColumnTrait specifies the methods needed for custom cell handling. ">CGridColumnTrait</a> specifies the methods needed for custom cell handling. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3ea765aad5a3b38748515404867ffffd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CGridColumnTrait::Accept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_grid_column_trait_visitor.html">CGridColumnTraitVisitor</a> &amp;&#160;</td>
          <td class="paramname"><em>visitor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#a3ea765aad5a3b38748515404867ffffd" title="Override Accept() and update CGridColumnTraitVisitor for new column-trait classes. ">Accept()</a> and update <a class="el" href="class_c_grid_column_trait_visitor.html" title="CGridColumnTraitVisitor enables the use of the visitor-pattern to add extra behavior to the CGridColu...">CGridColumnTraitVisitor</a> for new column-trait classes. </p>
<ul>
<li>Will enable the use of the visitor-pattern ex. for serialization of column-traits </li>
</ul>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#afab1c0f10273f90f8ac171eec86cfb1c">CGridColumnTraitImage</a>, <a class="el" href="class_c_grid_column_trait_combo.html#ae78cb80f5de89141f014c05dba8d54db">CGridColumnTraitCombo</a>, <a class="el" href="class_c_grid_column_trait_text.html#a105b61e35243056a6ebab4e5677fdfa5">CGridColumnTraitText</a>, <a class="el" href="class_c_grid_column_trait_date_time.html#aae5d750254c2499806fa7af709d32e7e">CGridColumnTraitDateTime</a>, <a class="el" href="class_c_grid_column_trait_edit.html#af756c0562ed2a717dd67b38efab01c01">CGridColumnTraitEdit</a>, and <a class="el" href="class_c_grid_column_trait_multiline_edit.html#a3bbfe6f1e31903205bb7d8252ac49cdc">CGridColumnTraitMultilineEdit</a>.</p>

</div>
</div>
<a class="anchor" id="ad381f010d27330d143bdd354a048dcc4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CGridColumnTrait::IsCellReadOnly </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">int&#160;</td>
          <td class="paramname"><em>nRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nCol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&#160;</td>
          <td class="paramname"><em>pt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#ad381f010d27330d143bdd354a048dcc4" title="Override IsCellReadOnly() to provide custom control whether a cell can be edited. ...">IsCellReadOnly()</a> to provide custom control whether a cell can be edited. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The list control starting edit </td></tr>
    <tr><td class="paramname">nRow</td><td>The index of the row for the cell </td></tr>
    <tr><td class="paramname">nCol</td><td>The index of the column for the cell </td></tr>
    <tr><td class="paramname">pt</td><td>The position clicked, in client coordinates. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is cell read only ? (true / false) </dd></dl>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#a36318c4778486cc897dcddb98882ac25">CGridColumnTraitImage</a>.</p>

</div>
</div>
<a class="anchor" id="a6d6a621ea236708a4a0aa823a6f6a9b4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CGridColumnTrait::OnClickEditStart </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">int&#160;</td>
          <td class="paramname"><em>nRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nCol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&#160;</td>
          <td class="paramname"><em>pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bDblClick</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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#a6d6a621ea236708a4a0aa823a6f6a9b4" title="Override OnClickEditStart() to control whether cell edit should be started when clicked with the mous...">OnClickEditStart()</a> to control whether cell edit should be started when clicked with the mouse. </p>
<p><a class="el" href="class_c_grid_column_trait.html#ab39126ae5476356c25166c2f08a3d8a2" title="Override OnEditBegin() to provide your own special cell-edit control. ">OnEditBegin()</a> will be called when return value &gt;= 1. Do NOT start the editor within this method, as it will cause havoc in the mouse click handler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The list control being clicked </td></tr>
    <tr><td class="paramname">nRow</td><td>The index of the row </td></tr>
    <tr><td class="paramname">nCol</td><td>The index of the column </td></tr>
    <tr><td class="paramname">pt</td><td>The position clicked, in client coordinates. </td></tr>
    <tr><td class="paramname">bDblClick</td><td>The position was double clicked </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>How should the cell editor be started (0 = No editor, 1 = Start Editor, 2 = Start Editor and block click-event) </dd></dl>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#a6ba02cf22b69207ae90360ab47911c04">CGridColumnTraitImage</a>, and <a class="el" href="class_c_grid_column_trait_hyper_link.html#a4ef2ad4c00ff677fa3cffcb8e5225fe2">CGridColumnTraitHyperLink</a>.</p>

</div>
</div>
<a class="anchor" id="ad3ae6a1a52c2d96f0f122d5af37eb17e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CGridColumnTrait::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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#ad3ae6a1a52c2d96f0f122d5af37eb17e" title="Override OnCustomDraw() to provide your own special cell-drawing. ">OnCustomDraw()</a> to provide your own special cell-drawing. </p>
<ul>
<li>Must handle selection drawing</li>
<li>Must handle focus drawing<ul>
<li>Must handle selection drawing when the CListCtrl doesn't have focus</li>
</ul>
</li>
<li>Must query owner if special foreground/background-color or font should be used</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 in <a class="el" href="class_c_grid_column_trait_text.html#a3a3e262526ce3c363311289a25092fe5">CGridColumnTraitText</a>.</p>

</div>
</div>
<a class="anchor" id="ab39126ae5476356c25166c2f08a3d8a2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CWnd* CGridColumnTrait::OnEditBegin </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">int&#160;</td>
          <td class="paramname"><em>nRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nCol</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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#ab39126ae5476356c25166c2f08a3d8a2" title="Override OnEditBegin() to provide your own special cell-edit control. ">OnEditBegin()</a> to provide your own special cell-edit control. </p>
<ul>
<li>The edit control must inherit from CWnd</li>
<li>The edit control must delete itself when it looses focus</li>
<li>The edit control must send a LVN_ENDLABELEDIT message when edit is complete</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The list control starting edit </td></tr>
    <tr><td class="paramname">nRow</td><td>The index of the row for the cell to edit </td></tr>
    <tr><td class="paramname">nCol</td><td>The index of the column for the cell to edit </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the cell editor to use (NULL if cell edit is not possible) </dd></dl>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#a5805e0700f450c1b79f86ac5bbcac172">CGridColumnTraitImage</a>, <a class="el" href="class_c_grid_column_trait_hyper_link.html#a42f8ea5934d65b74c6205a1205c8b1e7">CGridColumnTraitHyperLink</a>, <a class="el" href="class_c_grid_column_trait_combo.html#ae61ea24e0da2552779646d66cc9cb93a">CGridColumnTraitCombo</a>, <a class="el" href="class_c_grid_column_trait_date_time.html#acba95b50bdbaeb960807e443f0dc3aa2">CGridColumnTraitDateTime</a>, and <a class="el" href="class_c_grid_column_trait_edit.html#acbb77050df8e1134f6840c0e4832007c">CGridColumnTraitEdit</a>.</p>

</div>
</div>
<a class="anchor" id="a76ae73e830f71f63dacc7529125435a1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CWnd* CGridColumnTrait::OnEditBegin </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">int&#160;</td>
          <td class="paramname"><em>nRow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nCol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&#160;</td>
          <td class="paramname"><em>pt</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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#ab39126ae5476356c25166c2f08a3d8a2" title="Override OnEditBegin() to provide your own special cell-edit control. ">OnEditBegin()</a> to provide your own special cell-edit control. </p>
<ul>
<li>The edit control must inherit from CWnd</li>
<li>The edit control must delete itself when it looses focus</li>
<li>The edit control must send a LVN_ENDLABELEDIT message when edit is complete</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The list control starting edit </td></tr>
    <tr><td class="paramname">nRow</td><td>The index of the row for the cell to edit </td></tr>
    <tr><td class="paramname">nCol</td><td>The index of the column for the cell to edit </td></tr>
    <tr><td class="paramname">pt</td><td>The position clicked, in client coordinates. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the cell editor to use (NULL if cell edit is not possible) </dd></dl>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#a64719019b986858ae317aacb20cfc93c">CGridColumnTraitImage</a>, <a class="el" href="class_c_grid_column_trait_hyper_link.html#a3211c69719930f6f4733652be54d4af5">CGridColumnTraitHyperLink</a>, <a class="el" href="class_c_grid_column_trait_combo.html#ac52a1cf430c478e4af9b78aeb02a50f2">CGridColumnTraitCombo</a>, <a class="el" href="class_c_grid_column_trait_date_time.html#a81525feb1113bc30320bd417d0c1daad">CGridColumnTraitDateTime</a>, and <a class="el" href="class_c_grid_column_trait_edit.html#aeb7493d9a5fadb6c0f6fa2281c14302a">CGridColumnTraitEdit</a>.</p>

</div>
</div>
<a class="anchor" id="acafacfe30da0504e9583e58d5a4857e9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CGridColumnTrait::OnInsertColumn </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">int&#160;</td>
          <td class="paramname"><em>nCol</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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#acafacfe30da0504e9583e58d5a4857e9" title="Override OnInsertColumn() to provide your own special styling of the column, after column has been ad...">OnInsertColumn()</a> to provide your own special styling of the column, after column has been added. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>The list control adding column </td></tr>
    <tr><td class="paramname">nCol</td><td>The index of the column just added </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1b477cc5ceae8a47babf94b4478ed048"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CGridColumnTrait::OnSortRows </td>
          <td>(</td>
          <td class="paramtype">const LVITEM &amp;&#160;</td>
          <td class="paramname"><em>leftItem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const LVITEM &amp;&#160;</td>
          <td class="paramname"><em>rightItem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bAscending</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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#a1b477cc5ceae8a47babf94b4478ed048" title="Override OnSortRows() to provide your own special row sorting. ">OnSortRows()</a> to provide your own special row sorting. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">leftItem</td><td>Left cell item </td></tr>
    <tr><td class="paramname">rightItem</td><td>Right cell item </td></tr>
    <tr><td class="paramname">bAscending</td><td>Perform sorting in ascending or descending order </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is left value less than right value (-1) or equal (0) or larger (1) </dd></dl>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#a3d9c0910f1579dad08f282a0c202f421">CGridColumnTraitImage</a>, <a class="el" href="class_c_grid_column_trait_date_time.html#ae7e519954b1e43237ba7c525e81b3247">CGridColumnTraitDateTime</a>, and <a class="el" href="class_c_grid_column_trait_text.html#a2f43ad22606a31ae9965a85de17ebf26">CGridColumnTraitText</a>.</p>

</div>
</div>
<a class="anchor" id="a2e3d1fc0f5e0f41a985bffedfec3eb30"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CGridColumnTrait::OnSortRows </td>
          <td>(</td>
          <td class="paramtype">LPCTSTR&#160;</td>
          <td class="paramname"><em>pszLeftValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCTSTR&#160;</td>
          <td class="paramname"><em>pszRightValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bAscending</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">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Override <a class="el" href="class_c_grid_column_trait.html#a1b477cc5ceae8a47babf94b4478ed048" title="Override OnSortRows() to provide your own special row sorting. ">OnSortRows()</a> to provide your own special row sorting. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pszLeftValue</td><td>Left cell value </td></tr>
    <tr><td class="paramname">pszRightValue</td><td>Right cell value </td></tr>
    <tr><td class="paramname">bAscending</td><td>Perform sorting in ascending or descending order </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is left value less than right value (-1) or equal (0) or larger (1) </dd></dl>

<p>Reimplemented in <a class="el" href="class_c_grid_column_trait_image.html#a38f766b818c68b907c1bd50e4abd6b0c">CGridColumnTraitImage</a>, <a class="el" href="class_c_grid_column_trait_date_time.html#aa95b405d67aeb3312719b018b4f193dc">CGridColumnTraitDateTime</a>, and <a class="el" href="class_c_grid_column_trait_text.html#aa93469a61a6ae6f4c0ef32f7e3393b3c">CGridColumnTraitText</a>.</p>

</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

You may also be interested in...

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04-2016 | 2.8.180920.1 | Last Updated 16 Mar 2015
Article Copyright 2008 by Rolf Kristensen
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid