<?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 : CXTPSyntaxEditCtrl::CanEditDoc() bug?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTPSyntaxEditCtrl::CanEditDoc() bug?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 08:25:26 +0000</pubDate>
  <lastBuildDate>Fri, 16 Apr 2010 06:37:49 +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=16604</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[CXTPSyntaxEditCtrl::CanEditDoc() bug? :  To disable editing in CXTPSyntaxEditCtrl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16604&amp;PID=58114&amp;title=cxtpsyntaxeditctrlcaneditdoc-bug#58114</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6047">awelzel</a><br /><strong>Subject:</strong> 16604<br /><strong>Posted:</strong> 16 April 2010 at 6:37am<br /><br />To disable editing in CXTPSyntaxEditCtrl there seem to be three methods:<br><br><ol><li><font face="Courier New, Courier, mono">CXTPSyntaxEditCtrl::SetViewOnly(TRUE)</font> - text is still displayed as usual, but no editing possible and there is even no cursor</li><li><font face="Courier New, Courier, mono">CXTPSyntaxEditCtrl::SetReadOnly(TRUE)</font> - same as SetViewOnly(), but text is also greyed</li><li>Overwriting <font face="Courier New, Courier, mono">CXTPSyntaxEditCtrl::CanEditDoc()</font> to return <font face="Courier New, Courier, mono">FALSE</font> always - so text is not editable, but you can still mark text using the cursor etc.</li></ol>We use a class based on <font face="Courier New, Courier, mono">CXTPSyntaxEditCtrl</font> to implement a log output window with syntax highlighting. The user must not be able to change anything in this output window, but he should be able to mark and copy parts of the output.<br><br>So we've overwritten <font face="Courier New, Courier, mono">CXTPSyntaxEditCtrl::CanEditDoc()</font>:<br><br><font face="Courier New, Courier, mono">BOOL CMyClass::CanEditDoc()<br>{<br>&nbsp;&nbsp;&nbsp; return FALSE;<br>}<br></font><br>Result: There is still a cursor and text can still be selected and copied but it can not be changed.<br><br>BUT: When selecting text, this text block can be moved around using the left mouse button - which is of course a change of the text!<br><br>Shouldn't <font face="Courier New, Courier, mono">CanEditDoc()</font> avoid this behaviour as well? Using SetViewOnly() or SetReadOnly() is not an options, as this also disables the cursor, which is needed to select text.<br><br>]]>
   </description>
   <pubDate>Fri, 16 Apr 2010 06:37:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16604&amp;PID=58114&amp;title=cxtpsyntaxeditctrlcaneditdoc-bug#58114</guid>
  </item> 
 </channel>
</rss>