<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<BR>> > ==============================================================================<BR>> > # Patch<BR>> > ==============================================================================<BR>> > --- wine-1.1.1-orig/dlls/user32/win.c 2008-07-12 01:55:55.000000000 +1000<BR>> > +++ wine-1.1.1/dlls/user32/win.c 2008-07-14 16:49:21.000000000 +1000<BR>> > @@ -173,6 +173,13 @@ static WND *create_window_handle( HWND p<BR>> > win->owner = full_owner;<BR>> > win->class = class;<BR>> > win->winproc = get_class_winproc( class );<BR>> > + /* This is a window hack - When builtin Edit class has been subclassed by SetClassLong(Ptr)W */<BR>> > + /* If creating ansi Edit window & the class does not have a ansi proc, use unicode proc as ansi */<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((WNDPROC)WINPROC_GetProc( win->winproc, 1 ), NULL);<BR>> > + }<BR>> <BR>> It doesn't seem likely that this behaviour just applies to edit<BR>> controls. More likely, it applies to all builtin classes.<BR>> <BR>> -- <BR>> Rob Shearman<BR><BR>
<BR>
Yes you are right, this behaviour applies to all builtin classes. I can either <BR>
<BR>
1. add more strcmpiW to compare with all the class names, <BR>
<BR>
This can slow down create_window_handle() a little bit.<BR>
<BR>
or<BR>
2. prove that there is no need for other builtin classes.<BR>
<BR>
The major difference before Edit and other builtin controls is: the Text in other builtin control does<BR>
not interact with user, the WM_SETTEXT message do A->W conversion, WM_GETTEXT do a <BR>
W->A conversion, it can get same string back. so current wine can handle it.<BR>
<BR>
The Edit control interact with user and input system, W->A conversion of SendMessageA(WM_GETTEXT)<BR>
will not get eact the same string as user entered (eg CJK text). So if we create a Ansi Edit window, we do<BR>
not want W->A conversion. That is why my patch is needed to make Edit window a Ansi window.<BR>
<BR>
So what do you think we should do?<BR>
<BR>
Regards<BR>
Hongbo<BR><br /><hr />Sell your car for just $40 at CarPoint.com.au <a href='http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT' target='_new'>It's simple! </a></body>
</html>