Solved

Hidden text in CRichEditCtrl.

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

726 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