<html>
<body>
<font size=3><br>
This patch fixes Bug#14350<br><br>
CreateWindowA("Edit"...) should create an Ansi window even
after the builtin<br>
Edit class has been subclassed by
SetClassLongPtrW(hEdit,GCLP_WNDPROC,procW).<br><br>
This bug applies to all builtin classes, but only Edit needs to be
fixed<br>
since in other builtin classes, user can not change the text in the
control.<br>
A->W->A conversion will get same string back. Edit is special since
user<br>
interact with it.<br><br>
---<br>
dlls/user32/win.c | 10 ++++++++++<br>
1 files changed, 10 insertions(+), 0 deletions(-)<br><br>
diff --git a/dlls/user32/win.c b/dlls/user32/win.c<br>
index 9a97a3a..3e916da 100644<br>
--- a/dlls/user32/win.c<br>
+++ b/dlls/user32/win.c<br>
@@ -173,6 +173,16 @@ static WND *create_window_handle( HWND parent, HWND
owner, LPCWSTR name,<br>
win->owner =
full_owner;<br>
win->class =
class;<br>
win->winproc =
get_class_winproc( class );<br>
+ /* This is a window hack - When builtin class is
subclassed by SetClassLongW */<br>
+ /* If creating an ansi Edit window & the class
has no ansi proc, use unicode */<br>
+ /* proc as ansi proc. While this hack applies to all
builtin classes, only Edit */<br>
+ /* class needs to to be fixed, because the text in
the other builtin classes */<br>
+ /* do not interact with the user, a A->W->A
conversion will get same str back*/<br>
+ if(!unicode && !IS_INTRESOURCE(name)
&& !strcmpiW( name, EDIT_builtin_class.name )<br>
+ && WINPROC_IsUnicode(
win->winproc, 0 ) && WINPROC_IsUnicode( win->winproc,
1 ))<br>
+ {<br>
+ win->winproc =
WINPROC_AllocProc( WINPROC_GetProc( win->winproc, 1 ), NULL );<br>
+ }<br>
win->dwMagic =
WND_MAGIC;<br>
win->cbWndExtra = extra_bytes;<br>
if (WINPROC_IsUnicode( win->winproc, unicode
)) win->flags |= WIN_ISUNICODE;<br>
--<br>
1.5.2.1<br><br>
</font></body>
</html>