Commit 859b1e89 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

riched20: Use EM_GETTEXTLENGTHEX to implement WM_GETTEXTLENGTH.

parent 60a2d66e
......@@ -3969,10 +3969,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case WM_GETTEXTLENGTH:
{
GETTEXTLENGTHEX how;
/* CR/LF conversion required in 2.0 mode, verbatim in 1.0 mode */
how.flags = GTL_CLOSE | (editor->bEmulateVersion10 ? 0 : GTL_USECRLF) | GTL_NUMCHARS;
how.codepage = unicode ? CP_UNICODE : CP_ACP;
how.codepage = CP_UNICODE;
return ME_GetTextLengthEx(editor, &how);
}
case EM_GETTEXTLENGTHEX:
......
......@@ -801,6 +801,15 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
FillRect( hdc, &rc, editor->hbrBackground );
return 1;
}
case WM_GETTEXTLENGTH:
{
GETTEXTLENGTHEX params;
params.flags = GTL_CLOSE | (host->emulate_10 ? 0 : GTL_USECRLF) | GTL_NUMCHARS;
params.codepage = unicode ? CP_UNICODE : CP_ACP;
hr = ITextServices_TxSendMessage( host->text_srv, EM_GETTEXTLENGTHEX, (WPARAM)&params, 0, &res );
break;
}
case WM_PAINT:
{
HDC hdc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment