mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 04:54:46 +00:00
riched20: Handle EM_REPLACESEL'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
9fa993022e
commit
45d21d0090
|
@ -3883,14 +3883,11 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
|
|||
}
|
||||
case EM_REPLACESEL:
|
||||
{
|
||||
int len = 0;
|
||||
LONG codepage = unicode ? CP_UNICODE : CP_ACP;
|
||||
LPWSTR wszText = ME_ToUnicode(codepage, (void *)lParam, &len);
|
||||
WCHAR *text = (WCHAR *)lParam;
|
||||
int len = text ? lstrlenW( text ) : 0;
|
||||
|
||||
TRACE("EM_REPLACESEL - %s\n", debugstr_w(wszText));
|
||||
|
||||
ME_ReplaceSel(editor, !!wParam, wszText, len);
|
||||
ME_EndToUnicode(codepage, wszText);
|
||||
TRACE( "EM_REPLACESEL - %s\n", debugstr_w( text ) );
|
||||
ME_ReplaceSel( editor, !!wParam, text, len );
|
||||
return len;
|
||||
}
|
||||
case EM_SCROLLCARET:
|
||||
|
|
|
@ -849,6 +849,17 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
|
|||
EndPaint( editor->hWnd, &ps );
|
||||
return 0;
|
||||
}
|
||||
case EM_REPLACESEL:
|
||||
{
|
||||
int len;
|
||||
LONG codepage = unicode ? CP_UNICODE : CP_ACP;
|
||||
WCHAR *text = ME_ToUnicode( codepage, (void *)lparam, &len );
|
||||
|
||||
hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, (LPARAM)text, &res );
|
||||
ME_EndToUnicode( codepage, text );
|
||||
res = len;
|
||||
break;
|
||||
}
|
||||
case EM_SETOPTIONS:
|
||||
{
|
||||
DWORD style;
|
||||
|
|
Loading…
Reference in a new issue