Click here to Skip to main content
15,916,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm displaying the content of an RTF file quite happily and want to display a specific line as a title using a static control.

I therefore want to remove unwanted rtf information from the start of the string. My string is as below.

"{\f1\fs20
\par }{\b\f1\cf13 my string to display"

Is there a function to do this, or can you point me to where I can strip the text so all I display is "my string to display"?

TIA

Tony
Posted

1 solution

Here you go:
ITextServices::TxGetText Method[^]

Implement a "dummy" ITextHost[^] use a memory dc for the TxGetDC[^] method

Get the ITextServices[^] using CreateTextServices[^]

Regards
Espen Harlinn
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900