riched20: Handle WM_SETTEXT's unicode conversion in the host.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
64bbbda2fd
commit
21fc1b530d
|
@ -3953,7 +3953,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
|
|||
ME_StreamInRTFString(editor, 0, (char *)lParam);
|
||||
}
|
||||
else
|
||||
ME_SetText(editor, (void*)lParam, unicode);
|
||||
ME_SetText( editor, (void*)lParam, TRUE );
|
||||
}
|
||||
else
|
||||
TRACE("WM_SETTEXT - NULL\n");
|
||||
|
|
|
@ -865,6 +865,18 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
|
|||
SetWindowLongW( hwnd, GWL_STYLE, style );
|
||||
return res;
|
||||
}
|
||||
case WM_SETTEXT:
|
||||
{
|
||||
char *textA = (char *)lparam;
|
||||
WCHAR *text = (WCHAR *)lparam;
|
||||
int len;
|
||||
|
||||
if (!unicode && textA && strncmp( textA, "{\\rtf", 5 ) && strncmp( textA, "{\\urtf", 6 ))
|
||||
text = ME_ToUnicode( CP_ACP, textA, &len );
|
||||
hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, (LPARAM)text, &res );
|
||||
if (text != (WCHAR *)lparam) ME_EndToUnicode( CP_ACP, text );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = ME_HandleMessage( editor, msg, wparam, lparam, unicode, &hr );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue