Solved

Hidden text in CRichEditCtrl.

Posted on 1998-07-24
3
732 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 169
Complete beginner needs help making a cron job 9 131
Prevent this page from creating additional dialogs. 3 721
Problem to App source 6 93
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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