C++ Builder Syntax Highlighter - c++

I have searched on the Internet how to do this, but I can't find how.
I need to colour specific words in RichEdit, such as the words false and true.

TRichEdit is not well-suited for syntax highlighting (use something more like SynEdit instead), but it can be done. Basically, you need to highlight the desired text, and then set the selected text's attributes, like color and formatting. You can do that with the TRichEdit::SelStart, TRichEdit::SelLength, and TRichEdit::SelAttributes properties. Or you can use the corresponding Win32 API EM_EXSETSEL and EM_SETCHARFORMAT messages directly.
See Robert Dunn's excellent article on this very topic: "Faster Rich Edit Syntax Highlighting". The Original article first appeared in the C++Builder Journal in October 1999, and is also available for download on Robert's "Yet Another Code Site" website (which is archived on my website).

Related

How can I change the line style of the indent guides?

Visual Studio 2017 comes with built-in support for indent guides:
Indent Guides ­– dotted, gray vertical lines act as landmarks in code to provide context within your frame of view. You may recognize these from the popular Productivity Power Tools.
Here's a screenshot demonstrating this:
I've been using Steve Dower's Indent Guides extension for years now, which supports changing the line style:
Is it possible to change the line style in VS 2017? I had a look in the Options but couldn't find anything relevant.
From everything I can see, there is unfortunately no way to do this, aside from using a different extension. If you use ctrl+Q to search (FYI, ctrl+Q is a great feature that many people don't notice), and search for "guide" you will see it only returns a single configuration option:
Text Editor -> General -> Show structure guide lines
So apparently, all you can do is turn it on or off and change the color of the lines. This can be done by going to Environment -> Fonts and Colors and looking for "Structure Guide Lines."

Use of TABs in DirectWrite

I am just working my way through DirectWrite in C++ which appears to be solving my demands for having equal layouts in different render targets (screen and printer).
I have closely inspected the HelloWorld sample (http://msdn.microsoft.com/en-us/library/windows/desktop/dd368048%28v=vs.85%29.aspx) and already learned a lot from that.
The HelloWorld example was even topped (my opinion) by an article from Charles Petzold which was throwing much more light on advanced features of DirectWrite: "Character Formatting Extensions with DirectWrite" (http://www.charlespetzold.com/blog/2014/01/Character-Formatting-Extensions-with-DirectWrite.html).
But there is still one subject missing in all the documentation and examples I found so far: The documentation about use of TABstops in DirectWrite. All I found so far is a (very) short documentation about setting of "incremental tabs" which does not even mention how the text in each individual tab can be aligned.
Does anybody know about a more in-depth description about TABs in DirectWrite?
Thanks in advance.
Sounds like you're thinking Word degree of complexity tab stops with individual widths and alignment for each tab - IDWriteTextLayout supports uniform tab spacing where each tab is a multiple of a distance set by SetIncrementalTabStop. If you need to lay out several unique layouts with distinct distances and alignments, you'll need to create one IDWriteTextLayout per column. Tabs are convenient, but they aren't best for tables.

Syntax highlighting in blog like in Sublime Text 2

I have blog and I want to show codes on the sublimetext editor like that also I want to choice language and it changes color according to the language.
How can I do that?
You can use ExportHtml sublime plugin to export syntax highlighted code to html and paste it in your blog.
Perhaps take a look at:
http://code.google.com/p/django-syntax-highlight/
It is not 'embedding SublimeText' as per your question, but seems to provide a library that provides some decent syntax highlighting functionality. It uses http://pygments.org/
Sublime Text 2 is not a Javascript editor - you cannot embed it in webpages.
For edit - what you can embed:
ACE http://ace.ajax.org/
And some more: http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors
For view - syntax hihglighting
Use Google code prettify http://code.google.com/p/google-code-prettify/

Full list of functions, commands for MS Word from c++

I'm working with word through my c++ application. And I want to read some documentation about available opportunities. I see some piece of code of some paticular situations (to add a picture, to add text, to save file, to fill table) in forums, but I want to observe all functions.
Tell me where can I get such documentation or how to find it.
The full documentation can be found on MSDN: http://msdn.microsoft.com/en-us/library/ff841702

Trying to find a syntax highlighter for ColdFusion in Notepad++

I use CFEclipse for most of my projects and heavy lifting but sometimes I find the need to do a quick fix on pages outside the project scope that is easier to accomplish in a simple text editor.
I have googled but can't seem to find an answer so either a link to a download or a link to how to build my own would be awesome. thanks.
Update: Brien Malone's answer below along with charlie arehart's comments are what people should use at this point as nppColdFusion is no longer maintained as of 23 Sept 2011.
Disregard
nppColdFusion is actively maintained
In notepadd ++, go to 'Plugins'> 'Plugin Manager'> 'show plugin manager'. 'Coldfusion Lexer' is listed as available plugin
This question is a few years old now, and unfortunately, the accepted answer involving nppColdFusion is no longer valid because the plug-in doesn't work with NP++ after version 5.x.x and is not being maintained. (It stopped working when Notepad++ switched their plug-in hooking mechanism in version 6.x.x)
The Notepad++ site points to a library of nearly every language highlighter available:
http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files
ColdFusion (specifically CF9) is listed:
http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_CF9.xml
It's not as good as a full plug-in like nppColdFusion, but it is better than pages of black text.
Just a comment about Tony's answer (Aug 22 '14 at 13:00) : he wrote "In notepadd ++, go to 'Plugins'> 'Plugin Manager'> 'show plugin manager'."
However, in ver. 6.8 (maybe since before), there's no "Plugins" menu item on the menu bar. What I had to do is:
1- From the User Defined Language Page
http://docs.notepad-plus-plus.org/index.php?title=User_Defined_Language_Files
Download the ColdFusion User Defined Language file
http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_CF9.xml
Into the Notepad++ Folder
2- From the User Defined Language panel, import that file:
Language > Define your language... then press the Import button
ColdFusion will then appear at the bottom of the Language menu item selection list, and NotePad++ will automatically use it for any .CF file you open.
This link might help: http://howardscholz.wordpress.com/2007/06/01/notepad-support-for-coldfusion-8/
Disclaimer: I haven't tried it myself.
I found that nppColdFusion was working well, until I updated NP++ to version 7.6.6. I have tried just about everything to get it working, but to no avail.
I tried Delire Web's solution and it worked perfectly.
The different formatting (font and background colors) takes a bit of getting used to though.