如何从CRichEditCtrl获取单词数 [英] How To Get The Word Count From A CRichEditCtrl
本文介绍了如何从CRichEditCtrl获取单词数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以告诉我如何从A CRichEditCtrl获取单词计数吗?
谢谢
Dev.
Hi,
Can anybody please tell me how to get the word count from A CRichEditCtrl.
Thanks
Dev.
推荐答案
请参见此 [
See this[^] thread - this may help you calculate the word count.
Just get the text from this control and apply this logic.
如果您使用GetWindowText
函数而不是从Rich Edit控件中流式传输,则只会获取未格式化的文本,因此您将不需要处理格式字符.
然后,您只需要查找定义新单词的字符即可.
If you use theGetWindowText
function instead of streaming out of the rich edit control, you will only get the unformatted text so that you wont need to deal with the formatting characters.
Then you just need to find the characters that define a new word.
这篇关于如何从CRichEditCtrl获取单词数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文