<?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 : RichEditControl Item</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : RichEditControl Item]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 20:27:45 +0000</pubDate>
  <lastBuildDate>Thu, 30 Jul 2020 06:42:56 +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=24031</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[RichEditControl Item : Hi everyone,I want to implement...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24031&amp;PID=77799&amp;title=richeditcontrol-item#77799</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9435">anp410g</a><br /><strong>Subject:</strong> 24031<br /><strong>Posted:</strong> 30 July 2020 at 6:42am<br /><br />Hi everyone,<br>I want to implement my own XTPReportRecordItem Class , that must behave as a RichEdit element ( The CRichEditCtrl (V&nbsp;<span style="color: rgb34, 34, 34; font-family: arial, sans-serif; font-size: 14px;">4.1</span>) object is declared as a class member).<br>But I got problems resizing the item.<br><div>Here , I've overwritten CXTPReportRecordItem::OnDrawCaption() , to initialize every item of the row.<br><div><font face="Courier New, Courier, mono">void <b>CXTPReportRecordItemRichControl</b>::<b>OnDrawCaption</b>(<b>XTP_REPORTRECORDITEM_DRAWARGS</b>* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pMetrics)</font></div><div><font face="Courier New, Courier, mono">{</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; <span style="white-space:pre">	</span>if (!(pDrawArgs &amp;&amp; pMetrics))</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; return;</font></div><div><font face="Courier New, Courier, mono"><span style="white-space:pre">	</span>//CXTPReportRecordItem::OnDrawCaption(pDrawArgs, pMetrics);</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; CWnd*&nbsp; &nbsp; &nbsp; &nbsp;pControlWnd = dynamic_cast&lt;CWnd*&gt;(pDrawArgs-&gt;pControl);</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; CRect&nbsp; &nbsp; &nbsp; &nbsp;rect&nbsp; &nbsp; &nbsp; &nbsp; = pDrawArgs-&gt;rcItem;</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; DWORD&nbsp; &nbsp; &nbsp; &nbsp;dwStyle&nbsp; &nbsp; &nbsp;= ES_MULTILINE | WS_CHILD | WS_VISIBLE /*| WS_MAXIMIZE*/;</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; EDITSTREAM&nbsp; es&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = { reinterpret_cast&lt;DWORD_PTR&gt;(m_strRTFStream.GetString()), NULL, StreamInCallback };</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; if (pControlWnd == nullptr)</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; return;</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; if (<b>m_pRichCtrl </b>== nullptr)</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; {</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; <b>m_pRichCtrl </b>= new CRichEditCtrl();</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; if (<b>m_pRichCtrl</b>-&gt;<b>Create</b>(dwStyle, rect, pControlWnd, IDS_ML_RICHEDITCTRL))</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; {</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b>m_pRichCtrl</b>-&gt;SetReadOnly();</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b>m_pRichCtrl</b>-&gt;SetFont(GetFont());</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b>m_pRichCtrl</b>-&gt;SetBackgroundColor(FALSE, GetBackgroundColor());</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b>m_pRichCtrl</b>-&gt;StreamIn(SF_RTF, es);</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; }</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; }</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; else</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; <b>m_pRichCtrl</b>-&gt;<b>SetRect</b>(rect);</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; //<b>m_pRichCtrl</b>-&gt;<b>RequestResize</b>(); // Not working..</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; <b>m_nCurrRowSize </b>= pDrawArgs-&gt;pControl-&gt;GetPaintManager()-&gt;CalculateRowHeight(m_pRichCtrl-&gt;GetDC(), m_strRTFStream, MAXINT) + 50; // Here I get the Real Height of RichControl after inserting RTF Data</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; //<b>pDrawArgs</b>-&gt;<b>pDC</b>-&gt;<b>Rectangle</b>(rect.left, rect.top, rect.right, rect.bottom + m_nCurrRowSize); // Not working ..</font></div><div><font face="Courier New, Courier, mono">}</font></div></div><div><font face="Arial, Helvetica, sans-serif">Is there any way to change the height of the row (also width of the column) in the control, so all the richedit content properly fits in the control ?<br>I've tried to create my own PaintManager Class and overwrite the GetRowHeight Function and it worked , but all the rows get a common height ( actually I want all of them to have their own height ).</font></div><div><font face="Courier New, Courier, mono">&nbsp;</font></div><div><font face="Courier New, Courier, mono"><br></font></div>]]>
   </description>
   <pubDate>Thu, 30 Jul 2020 06:42:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24031&amp;PID=77799&amp;title=richeditcontrol-item#77799</guid>
  </item> 
 </channel>
</rss>