Commit 1da34891 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed WM_GETTEXTLENGTH handling.

parent 26146cdd
......@@ -493,10 +493,6 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
case WM_CTLCOLOR:
return (LRESULT)DEFWND_ControlColor( (HDC)wParam, HIWORD(lParam) );
case WM_GETTEXTLENGTH:
if (wndPtr->text) return (LRESULT)strlenW(wndPtr->text);
return 0;
case WM_SETCURSOR:
if (wndPtr->dwStyle & WS_CHILD)
{
......@@ -704,6 +700,12 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
}
break;
case WM_GETTEXTLENGTH:
if (wndPtr->text)
result = WideCharToMultiByte( CP_ACP, 0, wndPtr->text, strlenW(wndPtr->text),
NULL, 0, NULL, NULL );
break;
case WM_GETTEXT:
if (wParam && wndPtr->text)
{
......@@ -774,6 +776,12 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam,
}
break;
case WM_GETTEXTLENGTH:
if (wndPtr->text)
result = WideCharToMultiByte( CP_ACP, 0, wndPtr->text, strlenW(wndPtr->text),
NULL, 0, NULL, NULL );
break;
case WM_GETTEXT:
if (wParam && wndPtr->text)
{
......@@ -892,6 +900,10 @@ LRESULT WINAPI DefWindowProcW(
}
break;
case WM_GETTEXTLENGTH:
if (wndPtr->text) result = (LRESULT)strlenW(wndPtr->text);
break;
case WM_GETTEXT:
if (wParam && wndPtr->text)
{
......
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