Fixed WM_GETTEXTLENGTH handling.
This commit is contained in:
parent
26146cdd67
commit
1da348910e
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue