<?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 : 13,1 sample and SetSyntaxAndColorScheme</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Syntax Edit : 13,1 sample and SetSyntaxAndColorScheme]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 23 May 2026 03:00:42 +0000</pubDate>
  <lastBuildDate>Sun, 05 Jul 2009 04:43:31 +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=14688</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[13,1 sample and SetSyntaxAndColorScheme : Mark has been really helpful and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50678&amp;title=131-sample-and-setsyntaxandcolorscheme#50678</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 05 July 2009 at 4:43am<br /><br />Mark has been really helpful and I'm very grateful for this.<DIV>&nbsp;</DIV><DIV>The little application is nice and I hope that we can see a couple of extra small samples put into future builds of the Toolkit as it would make it much easier to use the syntax editor if this was the case.</DIV><DIV>&nbsp;</DIV><DIV>I said that I'd post&nbsp;the solution.&nbsp;It turns out that the trick to enabling syntax coloring&nbsp;when the text has not been loaded from a file&nbsp;is not too difficult:</DIV><DIV>&nbsp;</DIV><DIV>GetEditBuffer()-&gt;SetFileExt(_T(".XXX"));</DIV><DIV>&nbsp;</DIV><DIV>where XXX is the extension you which to use,&nbsp;as defined in&nbsp;your syntax definition</DIV><DIV>&nbsp;</DIV><DIV>and don't forget to add</DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>#define</FONT></FONT><FONT size=2> _XTP_INCLUDE_SYNTAXEDIT_LEXER</P></FONT>before including the XTToolkitPro.h file<BR></DIV>]]>
   </description>
   <pubDate>Sun, 05 Jul 2009 04:43:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50678&amp;title=131-sample-and-setsyntaxandcolorscheme#50678</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : This is a policy  and this is...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50674&amp;title=131-sample-and-setsyntaxandcolorscheme#50674</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 04 July 2009 at 10:08pm<br /><br />This is a policy <DIV>and this is a static app I did to robin:</DIV><DIV><a href="http://forum.codejock.com/uploads/20090704_221813_SyntaxEdit&#079;nDia.rar" target="_blank">uploads/20090704_221813_SyntaxEditOnDia.rar</A></DIV><DIV>&nbsp;</DIV><DIV>It take syntax and color schemes as a strings</DIV>]]>
   </description>
   <pubDate>Sat, 04 Jul 2009 22:08:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50674&amp;title=131-sample-and-setsyntaxandcolorscheme#50674</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : Thanks Mark, I have done so, and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50673&amp;title=131-sample-and-setsyntaxandcolorscheme#50673</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 04 July 2009 at 8:44pm<br /><br />Thanks Mark, I have done so, and am surprised (and pleased) that you have already responded on this.<DIV>&nbsp;</DIV><DIV>However, I must say that overall I'm rather saddened by the policy of routing things via private support tickets as I get a lot of help by looking at answers given to other people. If we arrive at an answer I will post it here so that others might benefit.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 04 Jul 2009 20:44:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50673&amp;title=131-sample-and-setsyntaxandcolorscheme#50673</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : Sure - open Issue and I will help...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50669&amp;title=131-sample-and-setsyntaxandcolorscheme#50669</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 04 July 2009 at 5:47pm<br /><br />Sure - open Issue and I will help you]]>
   </description>
   <pubDate>Sat, 04 Jul 2009 17:47:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50669&amp;title=131-sample-and-setsyntaxandcolorscheme#50669</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : If I knew how I could make a blank...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50668&amp;title=131-sample-and-setsyntaxandcolorscheme#50668</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 04 July 2009 at 4:58pm<br /><br />If I knew how I could make a blank UNSAVED file display SQL coloring by modifying the sample&nbsp;then I could apply this to my own situation. However, I don't know how to do this. The sample itself does not do any syntax coloring until a file is saved. SetPassedIniSet does not change this as far as I can tell.<DIV>&nbsp;</DIV><DIV>What I want to do is apply syntax coloring to a set of arbitrary text that I will ultimately store as a string within a data file. The text concerned is NEVER saved as a separate file, so I have to be able to tell the editor to use a particular syntax when displaying it. </DIV><DIV>&nbsp;</DIV><DIV>There must be a way to do this.</DIV>]]>
   </description>
   <pubDate>Sat, 04 Jul 2009 16:58:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50668&amp;title=131-sample-and-setsyntaxandcolorscheme#50668</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : this is why I use example with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50660&amp;title=131-sample-and-setsyntaxandcolorscheme#50660</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 04 July 2009 at 12:13pm<br /><br />this is why I use example with SQL syntax passed instead of CPP]]>
   </description>
   <pubDate>Sat, 04 Jul 2009 12:13:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50660&amp;title=131-sample-and-setsyntaxandcolorscheme#50660</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : I tried that but it doesn&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50651&amp;title=131-sample-and-setsyntaxandcolorscheme#50651</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 04 July 2009 at 3:25am<br /><br />I tried that but it doesn't seem to do anything.<DIV>&nbsp;</DIV><DIV>I think I'd be able to adjust things for my own uses if&nbsp;you could explain how it is possible to get the syntax editor sample to use the CPP coloring scheme, which it certainly does know about, when editing a fresh unsaved file,&nbsp;to which it currently applies no syntax coloring.&nbsp;In this situation the SetSyntaxAndColorScheme explicitly defaults to the CPP scheme (or uses the SetPassedIniSet values), so using SetPassedIniSet wouldn't help me choose a custom syntax mode.</DIV>]]>
   </description>
   <pubDate>Sat, 04 Jul 2009 03:25:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50651&amp;title=131-sample-and-setsyntaxandcolorscheme#50651</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : You can modify sample or use prev...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50649&amp;title=131-sample-and-setsyntaxandcolorscheme#50649</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 03 July 2009 at 8:47pm<br /><br />You can modify sample or use prev version of sample - it should works properly.<DIV>SetSyntaxAndColorScheme used for passing Syntax and Color schemes as strings without any files involved.</DIV><DIV>Sample use CPP for such case because this scheme already stored as a string in app complilation.</DIV><DIV>IniMode works as previous file-based mode.</DIV><DIV>If you need to set file extention - there is a function <FONT size=2>SetPassedIniSet</FONT></DIV><DIV><FONT size=2>e.g.</FONT></DIV><DIV><FONT color=#008000 size=2><P>GetEditCtrl().SetPassedIniSet(_T("&#091;Schemes&#093;\r\nSQL\r\n&#091;Themes&#093;\r\nDefault\r\nAlternative\r\n"));</P></FONT></DIV>]]>
   </description>
   <pubDate>Fri, 03 Jul 2009 20:47:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50649&amp;title=131-sample-and-setsyntaxandcolorscheme#50649</guid>
  </item> 
  <item>
   <title><![CDATA[13,1 sample and SetSyntaxAndColorScheme : I&amp;#039;m obviously missing something,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50647&amp;title=131-sample-and-setsyntaxandcolorscheme#50647</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 14688<br /><strong>Posted:</strong> 03 July 2009 at 8:21pm<br /><br /><P>I'm obviously missing something, but I find the MDI Text Editor sample in 13.1 quite baffling.</P><DIV>In the 13.0 sample, which lacked the SetSyntaxAndColorScheme calls and menu options, loading any of the recognized file types did result in appropriate syntax coloring. </DIV><DIV>&nbsp;</DIV><DIV>In the 13.1 sample there is rather different behaviour. If&nbsp;you load a .cpp file it works fine to apply syntax coloring. But if&nbsp;you load any other file, including ones that it should know about such as .schclass files, then these don't display any syntax coloring at all.</DIV><P><BR>For example, open any of the sample .schclass files. They display in black and white.</P><P>Select Reload Syntax... nothing changes.</P><P>Select ReloadSyntaxMode... nothing changes.</P><P>BUT, if you choose ReloadSyntax2IniMode then.... yes! Coloring is applied!</P><DIV>&nbsp;</DIV><DIV>However, I'm still no nearer to understanding how the SetSyntaxAndColorScheme calls work as in the sample they don't seem to do anything unless the file is a CPP file (.cpp or .h). The menu option additions that are new to the 13.1 sample&nbsp;(ReloadSyntaxMode etc)&nbsp;seem designed to illustrate the application of this call, but for anything other than a CPP file they do nothing. I realise that the code is specifically loading just the CPP coloring scheme, but why doesn't this call apply the CPP syntax to whatever file is currently loaded? It seems to "know" that it is not a CPP file--where is this set and how can I override it?</DIV><P>What I want to do is apply my own .schclass schema, loaded and passed via a string variable, and have this apply to any text displayed in the syntax editor. Moreover, I don't want the choice of syntax rules to depend on the file extension. For example, how is it possible to set the syntax coloring style for a new file that has not yet been saved? As the sample currently stands, such files never show syntax coloring and it isn't obvious how I can change this.</P><P>Any help appreciated....</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Fri, 03 Jul 2009 20:21:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14688&amp;PID=50647&amp;title=131-sample-and-setsyntaxandcolorscheme#50647</guid>
  </item> 
 </channel>
</rss>