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 coloursetstatic 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.