If fupdating tcontrol oalibtn tcontrolsender richedit
You must ensure that the array is large enough to hold the selected text plus a terminating null character.To retrieve a specified range of text, use the EM_GETTEXTRANGE message.If the start is 0 and the end is –1, all the text in the edit control is selected.If the start is –1, any current selection is deselected.For more information, see Rich Edit Control Styles.In Microsoft Visual Studio 2005 and later, it is possible to add a rich edit control into a dialog template by dragging the control from the toolbox.The TEXTRANGE structure used with this message specifies the text range to retrieve and points to a character array that receives the text.Here again, the application must ensure that the array is large enough for the specified text plus a terminating null character.
To replace all of the text, use the WM_SETTEXT message.
The higher value specifies the position of the first character beyond the selection.
The lower of the two values specifies the character position of the first character in the selection.
You can search for a string in a rich edit control by using the EM_FINDTEXT or EM_FINDTEXTEX messages, or their Unicode equivalents, EM_FINDTEXTW and EM_FINDTEXTEXW.
The FINDTEXT structure that is used with the nonextended versions specifies the text range to search and the string to search for.