Solved

Hidden text in CRichEditCtrl.

Posted on 1998-07-24
3
718 Views
Last Modified: 2013-11-20
I am inserting items into a rich edit control.  I need to be able to identify the itmes as they are deleted.  These items are of two types, either a block of protected text(that will be deleted as a whole block) or an file that is inserted as an object using InsertObject(filename).  These items are identified using an ID number from a database, so I want to be able to tag them with this ID number in the rich edit text using hidden text.  Evertime I try to insert any foreign rtf code into the rich edit, it is filtered out by the control.

Is there a way to insert comments into rtf?  Hidden text codes(/v .... /v0) are removed by the control and the hidden text appears as normal text.

It looks like the /v just doesn't match the known rtf codes of the rich edit control.  Is there something I am not doing, or is there a way to tell the control what this is?

.....any new ideas of how to identify these items as they are deleted are welcome.  

Thank you,
Adam
0
Comment
Question by:adamd
3 Comments
 
LVL 2

Expert Comment

by:kinkajou
ID: 1319717
I have not verified that hidden text code is /v /v0, but there is a standard from MS at: //support.microsoft.com/support/downloads - Microsoft Office - Word - 97 - GC0165.EXE: Rich Text Format (RTF) Specification v. 1.5 that details \v as character formatting properties. It mentions \comment as the correct tag to add comments to RTF text. Another site, with RTF 1.15 specification, is www.sunpack.com/rtf/rtf115.htm.
0
 
LVL 1

Accepted Solution

by:
rlarner earned 150 total points
ID: 1319718
The CRichEditCtrl class uses the window's class RichEdit version 1.0, which only supports RTF spec 1.0 (search Microsoft for "Supported RTF Codes" and it will tell you exactly what the RichEdit10 window supports.  \comment is not supported, and I believe elsewhere they list that \v is stripped also even though it is listed as supported).  It will filter out any unknown codes, as you noticed.
There is a new RichEdit windows class, but there is currently no wrapper for it that I know about.  See Q.10044564 and Q.10067157.
0
 

Author Comment

by:adamd
ID: 1319719
Thank your for your answer.  Your information is very helpful.  This doesn't really solve my problem, but it does answer my question.  Do you know where I can find a copy of the rtf spec, version 1.0?
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now