从CString中剥离rtf格式 [英] Stripping rtf formatting from a CString

查看:90
本文介绍了从CString中剥离rtf格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我很高兴地显示RTF文件的内容,并希望使用静态控件将特定的行显示为标题.

因此,我想从字符串的开头删除不需要的rtf信息.我的字符串如下.

"{\ f1 \ fs20
\ par} {\ b \ f1 \ cf13我要显示的字符串"

是否有执行此操作的功能,或者您能指出我要剥离文本的位置,以便显示的只是要显示的字符串"吗?

TIA

Tony

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

推荐答案

您在这里:
ITextServices :: TxGetText方法 [ ITextHost [TxGetDC [ ITextServices [ CreateTextServices [
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


这篇关于从CString中剥离rtf格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆