[英]Various methods to get entire text in a rich edit control as a CString
I want to get the entire text in a rich edit control as a CString, and from my reaseach there appear to be six ways of achieving this: 我想在一个丰富的编辑控件中将整个文本作为CString来获取,从我的研究中,似乎有六种方法可以实现这一点:
GetTextRange
and get the range by using GetTextLength
GetTextRange
并通过使用GetTextLength
获取范围 EM_GETTEXTEX
GetWindowText
GetDlgItemText
WM_GETETXT
EM_STREAMOUT
My questions are as follows: 我的问题如下:
GetTextRange
, GetWindowText
, and GetDlgItemText
versus using messages such as EM_GETTEXTEX
, WM_GETETXT
, and E M_STREAMOUT
. GetTextRange
, GetWindowText
和GetDlgItemText
与使用诸如EM_GETTEXTEX
, WM_GETETXT
和E M_STREAMOUT
消息之间有什么区别? EM_GETTEXTEX
, WM_GETETXT
, and EM_STREAMOUT
in terms of accomplishing this task of getting the entire text in a rich edit control as a CString
? EM_GETTEXTEX
, WM_GETETXT
和EM_STREAMOUT
在完成此任务方面有什么区别,该任务是在丰富的编辑控件中以CString
的形式获取整个文本? EM_GETTEXTEX
, or point me in the direction of one online? EM_GETTEXTEX
,还是让我朝着一个在线的方向发展? All are the same, except EM_STREAMOUT. 除EM_STREAMOUT以外,其他都相同。
No. 1 to 5 just get the plain text. 1至5号只是纯文本。 No. 6 gets the complete RTF stream.
6号获得完整的RTF流。 So No. 1. to 5. are just methods that do nearly the same as sending WM_GETTEXT.
因此,第1至5号方法与发送WM_GETTEXT的方法几乎相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.