Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hidden text in CRichEditCtrl.

Posted on 1998-07-24
3
Medium Priority
?
748 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 450 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 …
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

609 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