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:
GetTextRangeand get the range by usingGetTextLengthEM_GETTEXTEXGetWindowTextGetDlgItemTextWM_GETETXTEM_STREAMOUT
My questions are as follows:
- What is the difference between using methods such as
GetTextRange,GetWindowText, andGetDlgItemTextversus using messages such asEM_GETTEXTEX,WM_GETETXT, and EM_STREAMOUT. - When would you use one type, and when would you use another?
- What is the difference between
EM_GETTEXTEX,WM_GETETXT, andEM_STREAMOUTin terms of accomplishing this task of getting the entire text in a rich edit control as aCString? - Finally would it be possible for someone to provide an example of how to use
EM_GETTEXTEX, or point me in the direction of one online?
All are the same, except EM_STREAMOUT.
No. 1 to 5 just get the plain text. No. 6 gets the complete RTF stream. So No. 1. to 5. are just methods that do nearly the same as sending WM_GETTEXT.