I want to get the entire text in a rich edit control as a CString something like GetDlgItemText but this is for dialog boxes. The closest thing i can find from my research is: GetTextRange and get the range by using GetTextLength....But I suspect there is a better way....
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
- GetWindowText.
- GetDlgItemText works to, if you use the parent window and the ID of the RTF Control.
- WM_GETETXT.
If you want to retrieve the complete RTF text you Need to use EM_STREAMOUT (enough samples in the net).