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:
GetTextRange
and get the range by usingGetTextLength
EM_GETTEXTEX
GetWindowText
GetDlgItemText
WM_GETETXT
EM_STREAMOUT
My questions are as follows:
- What is the difference between using methods such as
GetTextRange
,GetWindowText
, andGetDlgItemText
versus 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_STREAMOUT
in 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?