Gets the text from a rich edit control.
Pointer to a GETTEXTEX structure, which indicates how to translate the text before putting it into the output buffer.
Pointer to the buffer to receive the text. The size of this buffer, in bytes, is specified by the cb member of the GETTEXTEX structure. Use the EM_GETTEXTLENGTHEX message to get the required size of the buffer.
The return value is the number of TCHARs copied into the output buffer, including the null terminator.
If the size of the output buffer is less than the size of the text in the control, the edit control will copy text from its beginning and place it in the buffer until the buffer is full. A terminating null character will still be placed at the end of the buffer.
If ANSI text is requested, EM_GETTEXTEX uses the WideCharToMultiByte function to translate the Unicode characters to ANSI. It allows you to go from Unicode to ANSI using a particular code page. The GETTEXTEX structure contains members (lpDefaultChar and lpUsedDefChar) that are used in the translation from Unicode to ANSI.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|