NO

Author Topic: Pelles C_Parser and RTF  (Read 3983 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2116
Pelles C_Parser and RTF
« on: June 29, 2017, 06:53:25 PM »
This example use Pelle's C_Parser to insert highlighted RTF code to richedit control.
Only for ANSI because usage of RTF.
It was made for a richedit callback routine usage.

Normal colourset
Code: [Select]
static char *szRTFDef = "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Courier New;}}"
"{\\colortbl;\\red0\\green0\\blue255;\\red0\\green128\\blue0;" // KEYWORD COMMENT
"\\red255\\green0\\blue0;\\red255\\green0\\blue255;" // NUMBER  STRING
"\\red128\\green0\\blue0;\\red0\\green0\\blue255;}" // PREPROCESSOR OPERATOR
"\\fs18"; // font size
EDIT 2017-07-02 some experiments for CR LF problem, like line continuation '\' in #define
let we know about other problems too.

« Last Edit: July 02, 2017, 06:36:08 PM by TimoVJL »
May the source be with you

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: Pelles C_Parser and RTF
« Reply #1 on: June 29, 2017, 10:41:46 PM »
A syntax highlighter? How does it work?

Grincheux

  • Guest
Re: Pelles C_Parser and RTF
« Reply #2 on: July 05, 2017, 08:11:29 AM »
Very Very interesting.
I try it.

Thanks :) :) :) :) :)