<html>
<body>
<font size=3><br>
This patch fixes Bug#14350<br><br>
CreateWindowA(&quot;Edit&quot;...) 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-&gt;W-&gt;A conversion will get same string back. Edit is special since
user<br>
interact with it.<br><br>
---<br>
&nbsp;dlls/user32/win.c |&nbsp;&nbsp; 10 ++++++++++<br>
&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp; win-&gt;owner&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
full_owner;<br>
&nbsp;&nbsp;&nbsp;&nbsp; win-&gt;class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
class;<br>
&nbsp;&nbsp;&nbsp;&nbsp; win-&gt;winproc&nbsp;&nbsp;&nbsp; =
get_class_winproc( class );<br>
+&nbsp;&nbsp;&nbsp; /* This is a window hack - When builtin class is
subclassed by SetClassLongW */<br>
+&nbsp;&nbsp;&nbsp; /* If creating an ansi Edit window &amp; the class
has no ansi proc, use unicode */<br>
+&nbsp;&nbsp;&nbsp; /* proc as ansi proc. While this hack applies to all
builtin classes, only Edit */<br>
+&nbsp;&nbsp;&nbsp; /* class needs to to be fixed, because the text in
the other builtin classes */<br>
+&nbsp;&nbsp;&nbsp; /* do not interact with the user, a A-&gt;W-&gt;A
conversion will get same str back*/<br>
+&nbsp;&nbsp;&nbsp; if(!unicode &amp;&amp; !IS_INTRESOURCE(name)
&amp;&amp; !strcmpiW( name, EDIT_builtin_class.name )<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; WINPROC_IsUnicode(
win-&gt;winproc, 0 ) &amp;&amp;&nbsp; WINPROC_IsUnicode( win-&gt;winproc,
1 ))<br>
+&nbsp;&nbsp;&nbsp; {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; win-&gt;winproc =
WINPROC_AllocProc( WINPROC_GetProc( win-&gt;winproc, 1 ), NULL );<br>
+&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp; win-&gt;dwMagic&nbsp;&nbsp;&nbsp; =
WND_MAGIC;<br>
&nbsp;&nbsp;&nbsp;&nbsp; win-&gt;cbWndExtra = extra_bytes;<br>
&nbsp;&nbsp;&nbsp;&nbsp; if (WINPROC_IsUnicode( win-&gt;winproc, unicode
)) win-&gt;flags |= WIN_ISUNICODE;<br>
--<br>
1.5.2.1<br><br>
</font></body>
</html>