Click to See Complete Forum and Search --> : RTF specification ****


Kenshin
July 27th, 2002, 07:53 AM
I need to make programm, which count symbols of plain text in RTF file. I dont know any MFC class, which can help me with this. So i decided to do this work using only C++ tools. (with MFC support of course). And now I must in my programm separate control words and plain text for counting only the second. I've looked in RTF specification in MSDN and finded out that it's not so easy. So the question is:
1. do you know how can MFC help me ?
2. Is there fixed number of control words in RTF file, wich preceded plain text ? So I can count all symbol after them, as plain text symbols.

Thank you!

Manish Malik
July 27th, 2002, 03:30 PM
msdn has a great example illustrating working MFC with .rtf files and Rich Edit Control ... search msdn for the "WORDPAD" sample. You'll find it listed most probably around the CRichEditCtrl class.

As for .NET, the System.Windows.Forms.RichTextBox class should be able to do everything for you, right from loading text from RTF file to formatting it and everything else.