Solved

Hidden text in CRichEditCtrl.

Posted on 1998-07-24
3
721 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 88
centeredAverage challenge 8 130
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 191
Fibonacci challenge 11 109
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

911 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

21 Experts available now in Live!

Get 1:1 Help Now