Fixed WM_GETTEXTLENGTH handling.

This commit is contained in:
Alexandre Julliard 2001-02-14 21:50:09 +00:00
parent 26146cdd67
commit 1da348910e
1 changed files with 16 additions and 4 deletions

View File

@ -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)
{