<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : How to add CMessageRecordItemCheck class?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : How to add CMessageRecordItemCheck class?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 20:42:25 +0000</pubDate>
  <lastBuildDate>Thu, 24 Sep 2009 14:57:33 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=15226</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[How to add CMessageRecordItemCheck class? : You don&amp;#039;t need to create...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53423&amp;title=how-to-add-cmessagerecorditemcheck-class#53423</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 15226<br /><strong>Posted:</strong> 24 September 2009 at 2:57pm<br /><br />You don't need to create special <FONT size=2>CMessageRecordItemCheck <DIV>Just use usual CXTPReportRecordItem</DIV><DIV>and call function CXTPReportRecordItem</FONT><FONT size=2></FONT><FONT color=#0000ff size=2></FONT>::<FONT size=2>HasCheckbox(BOOL bHasCheckbox, BOOL bTristate = FALSE)</FONT></DIV><DIV><FONT size=2>to setup checkbox if needed and usual or 3-state checkbox type</FONT></DIV><DIV><FONT size=2><FONT size=2><P></FONT><P><FONT color=#008000 size=2></P></FONT><FONT size=2></FONT><FONT color=#008000 size=2>// Adds check box area for item.</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// Parameters:</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// bHasCheckbox - TRUE if item has check box area.</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// bTristate - TRUE is tri-state checkbox, FALSE - if usual</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// See Also: SetChecked, IsChecked</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>&nbsp;</P></FONT></DIV></FONT>]]>
   </description>
   <pubDate>Thu, 24 Sep 2009 14:57:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53423&amp;title=how-to-add-cmessagerecorditemcheck-class#53423</guid>
  </item> 
  <item>
   <title><![CDATA[How to add CMessageRecordItemCheck class? : Thank you! I&amp;#039;ve checked the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53392&amp;title=how-to-add-cmessagerecorditemcheck-class#53392</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3058">Pluto</a><br /><strong>Subject:</strong> 15226<br /><strong>Posted:</strong> 23 September 2009 at 12:49pm<br /><br />Thank you! I've checked the samples and I am expecting the similar effects on my code. I just not sure what went wrong. Any hints? What else do I miss?]]>
   </description>
   <pubDate>Wed, 23 Sep 2009 12:49:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53392&amp;title=how-to-add-cmessagerecorditemcheck-class#53392</guid>
  </item> 
  <item>
   <title><![CDATA[How to add CMessageRecordItemCheck class? : Please look and analyze MFC ReportSample...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53359&amp;title=how-to-add-cmessagerecorditemcheck-class#53359</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 15226<br /><strong>Posted:</strong> 23 September 2009 at 12:04am<br /><br />Please look and analyze MFC ReportSample where CMessageRecord have checkbox item as you can see in this static exe - <DIV>&nbsp;</DIV><DIV><a href="https://forum.codejock.com/uploads/DemoVersi&#111;n/ReportSample12-1-Core13-2-Static.rar" target="_blank">https://forum.codejock.com/uploads/DemoVersion/ReportSample12-1-Core13-2-Static.rar</A><BR><a href="https://forum.codejock.com/uploads/DemoVersi&#111;n/ReportSampleStatic.rar" target="_blank">https://forum.codejock.com/uploads/DemoVersion/ReportSampleStatic.rar</A><BR></DIV>]]>
   </description>
   <pubDate>Wed, 23 Sep 2009 00:04:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53359&amp;title=how-to-add-cmessagerecorditemcheck-class#53359</guid>
  </item> 
  <item>
   <title><![CDATA[How to add CMessageRecordItemCheck class? : Hi everyone,  I am struggled...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53353&amp;title=how-to-add-cmessagerecorditemcheck-class#53353</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3058">Pluto</a><br /><strong>Subject:</strong> 15226<br /><strong>Posted:</strong> 22 September 2009 at 5:14pm<br /><br />Hi everyone,<DIV>&nbsp;</DIV><DIV>I am struggled this for a few days already. Please help a newbie out. I am trying to add a check box to my ReportControl class.</DIV><DIV>&nbsp;</DIV><DIV>I've added the following to my class' header:</DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>class</FONT></FONT><FONT size=2> CMessageRecordItemCheck : </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> CXTPReportRecordItem</P><DIV>{</DIV><P>DECLARE_SERIAL(CMessageRecordItemCheck)</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>public</FONT></FONT><FONT size=2>:</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Constructs record item with the initial checkbox value.</P></FONT></FONT><FONT size=2><P>CMessageRecordItemCheck(BOOL bCheck = FALSE);</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Provides custom group captions depending on checkbox value.</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Returns caption string ID to be read from application resources.</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>virtual</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> GetGroupCaptionID(CXTPReportColumn* pColumn);</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Provides custom records comparison by this item based on checkbox value, </P></FONT></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// instead of based on captions.</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>virtual</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> Compare(CXTPReportColumn* pColumn, CXTPReportRecordItem* pItem);</P><DIV></FONT><FONT size=2>};</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I also added the floowing to my class' cpp file:<FONT size=2><P>IMPLEMENT_SERIAL(CMessageRecordItemCheck, CXTPReportRecordItem, VERSIONABLE_SCHEMA | _XTP_SCHEMA_CURRENT)</P><DIV><FONT size=2><P>CMessageRecordItemCheck::CMessageRecordItemCheck(BOOL bCheck)</P><P>{</P><P>HasCheckbox(TRUE);</P><P>SetChecked(bCheck);</P><P>}</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>int</FONT></FONT><FONT size=2> CMessageRecordItemCheck::GetGroupCaptionID(CXTPReportColumn* </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>/*pColumn*/</FONT></FONT><FONT size=2>)</P><P>{ </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> IsChecked()? IDS_GROUP_CHECKED_TRUE: IDS_GROUP_CHECKED_FALSE; }</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>int</FONT></FONT><FONT size=2> CMessageRecordItemCheck::Compare(CXTPReportColumn* </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>/*pColumn*/</FONT></FONT><FONT size=2>, CXTPReportRecordItem* pItem)</P><P>{ </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2>(IsChecked()) - </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2>(pItem-&gt;IsChecked()); }</P></FONT></FONT></FONT><FONT size=2></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I created the checkbox column by:</FONT></DIV><FONT size=2><FONT size=2><P>pColumn = AddColumn(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> CXTPReportColumn(CXTPReportColumn(COLUMN_CHECK, _T(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>""</FONT></FONT><FONT size=2>), 18, FALSE, COLUMN_CHECK_ICON)) );</P><DIV></DIV></FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I added the item to the record at the beginning of the record by:</FONT></DIV><FONT size=2><FONT size=2><P>pItem = pRecord-&gt;AddItem(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> CMessageRecordItemCheck(bChecked));</P><DIV></DIV></FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I am able to see the check box icon in the column header but I am not able to see a checkbox in any row. Did I miss anything? Is there a detail tutorial for this somewhere?</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Any input is appreciated!</FONT></DIV>]]>
   </description>
   <pubDate>Tue, 22 Sep 2009 17:14:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15226&amp;PID=53353&amp;title=how-to-add-cmessagerecorditemcheck-class#53353</guid>
  </item> 
 </channel>
</rss>