<?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 : CRichEditCtrl - RTF - BIG - Help</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CRichEditCtrl - RTF - BIG - Help]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 18:18:38 +0000</pubDate>
  <lastBuildDate>Sat, 20 Sep 2008 16:34:00 +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=12197</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[CRichEditCtrl - RTF - BIG - Help :    Hi,This is my Method.EDITSTREAM...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41240&amp;title=cricheditctrl-rtf-big-help#41240</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4159">barobax</a><br /><strong>Subject:</strong> 12197<br /><strong>Posted:</strong> 20 September 2008 at 4:34pm<br /><br />Hi,This is my Method.<br>EDITSTREAM EnEnWriter::GetRTF()<br>{<br>&nbsp;&nbsp;&nbsp; CTime time;<br>&nbsp;&nbsp;&nbsp; int sec1 = time.GetSecond();<br>&nbsp;&nbsp;&nbsp; m_sRTF = L"{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0 Arial;}}{\\colortbl ;\\red0\\green0\\blue128;\\red0\\green0\\blue255;\\red0\\green128\\blue0;\\red128\\green0\\blue0;}{\\*\\generator Msftedit 5.41.21.2508;}\\viewkind4\\uc1\\pard\\f0\\fs20" + m_sRTF;<br>&nbsp;&nbsp;&nbsp; m_sRTF.Replace(L"\r\n", L"\\par"); // <font size="4"><b><font color="#0033ff">If this line is commented, charfrompos work correctly else wrong.</font></b></font><br>&nbsp;&nbsp;&nbsp; int nLength = m_sRTF.GetLength();<br>&nbsp;&nbsp;&nbsp; /////////////////////////Etymology///////////////////////////<br>&nbsp;&nbsp;&nbsp; int nIndex = 0;<br>&nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"Etymology", nIndex);<br>&nbsp;&nbsp;&nbsp; while (nIndex != -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_sRTF.Insert(nIndex, L"\\cf1");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nIndex += 13;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_sRTF.Insert(nIndex, L"\\cf0");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"Etymology", nIndex);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; ////////////////////////Functions////////////////////////////<br>&nbsp;&nbsp;&nbsp; nIndex = 0;<br>&nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"transitive verb", nIndex);<br>&nbsp;&nbsp;&nbsp; while (nIndex != -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_sRTF.Insert(nIndex, L"\\cf2");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nIndex += 19;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_sRTF.Insert(nIndex, L"\\cf0");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"transitive verb", nIndex);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; ////////////////////////Comments////////////////////////////<br>&nbsp;&nbsp;&nbsp; nIndex = 0;<br>&nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"&lt;", nIndex);<br>&nbsp;&nbsp;&nbsp; while (nIndex != -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_sRTF.Insert(nIndex, L"\\cf3");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"&gt;", nIndex);;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (nIndex != -1)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_sRTF.Insert(nIndex + 1, L"\\cf0");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nIndex = m_sRTF.Find(L"&lt;", nIndex);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; int final = (time.GetSecond() - sec1);<br>&nbsp;&nbsp;&nbsp; EDITSTREAM pStream;<br>&nbsp;&nbsp;&nbsp; pStream.dwCookie = (DWORD)&amp;m_sRTF; // Pass a pointer to the CString to the callback function<br>&nbsp;&nbsp;&nbsp; pStream.pfnCallback = StreamInCallback; // Specify the pointer to the callback function<br>&nbsp;&nbsp;&nbsp; return pStream;<br>}<br>]]>
   </description>
   <pubDate>Sat, 20 Sep 2008 16:34:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41240&amp;title=cricheditctrl-rtf-big-help#41240</guid>
  </item> 
  <item>
   <title><![CDATA[CRichEditCtrl - RTF - BIG - Help : Hi,Thank you very much for your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41225&amp;title=cricheditctrl-rtf-big-help#41225</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4159">barobax</a><br /><strong>Subject:</strong> 12197<br /><strong>Posted:</strong> 19 September 2008 at 9:48am<br /><br />Hi,<br>Thank you very much for your answer but my problem not solved<br>]]>
   </description>
   <pubDate>Fri, 19 Sep 2008 09:48:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41225&amp;title=cricheditctrl-rtf-big-help#41225</guid>
  </item> 
  <item>
   <title><![CDATA[CRichEditCtrl - RTF - BIG - Help : Not sure, but beware of &amp;#034;\r\n&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41203&amp;title=cricheditctrl-rtf-big-help#41203</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 12197<br /><strong>Posted:</strong> 19 September 2008 at 5:55am<br /><br />Not sure, but beware of "\r\n" for linebreaks. CharFromPos is not dependent of the underlying RTF.]]>
   </description>
   <pubDate>Fri, 19 Sep 2008 05:55:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41203&amp;title=cricheditctrl-rtf-big-help#41203</guid>
  </item> 
  <item>
   <title><![CDATA[CRichEditCtrl - RTF - BIG - Help : Hi,I have a problem with CRichEditCtrl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41167&amp;title=cricheditctrl-rtf-big-help#41167</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4159">barobax</a><br /><strong>Subject:</strong> 12197<br /><strong>Posted:</strong> 18 September 2008 at 2:46pm<br /><br />Hi,<br>I have a problem with CRichEditCtrl in MFC. I want to get char under mouse cursor.I use charFrompos but when I set a RTF format to RE this will not work.<br><br>&nbsp;&nbsp;&nbsp; int nPos = CRichEditCtrl::CharFromPos(point);<br>&nbsp;&nbsp;&nbsp; int nLine = HIWORD(nPos);// it's zero always when I set an RTF string. RTF replace \par with \n<br>&nbsp;&nbsp;&nbsp; int nIndex = LOWORD(nPos);<br>&nbsp;&nbsp;&nbsp; CString sText;<br>&nbsp;&nbsp;&nbsp; CRichEditCtrl::GetWindowText(sText);<br>&nbsp;&nbsp;&nbsp; char pChar1 = sText&#091;nIndex&#093;; //it's not char under mouse cursor.<br>&nbsp;&nbsp;&nbsp; char pChar2 = m_RTFText&#091;nIndex&#093;; //it's not char under mouse cursor too.<br><br>The codejock have a subclass from CRichEditCtrl ?!? or any other help at your experience ?!?<br><br>Thanks,<br>Best Regards,<br>]]>
   </description>
   <pubDate>Thu, 18 Sep 2008 14:46:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12197&amp;PID=41167&amp;title=cricheditctrl-rtf-big-help#41167</guid>
  </item> 
 </channel>
</rss>