2008/7/14 Hongbo Ni <hongbo_ni(a)hotmail.com>:
Now I have fixed the problem, or corrected to window behaviour. Included is the Patch, Test and Debug (play with windows). Can anyone please test or comment ?
Regards Hongbo Ni
============================================================================== # Patch ============================================================================== --- wine-1.1.1-orig/dlls/user32/win.c 2008-07-12 01:55:55.000000000 +1000 +++ wine-1.1.1/dlls/user32/win.c 2008-07-14 16:49:21.000000000 +1000 @@ -173,6 +173,13 @@ static WND *create_window_handle( HWND p win->owner = full_owner; win->class = class; win->winproc = get_class_winproc( class ); + /* This is a window hack - When builtin Edit class has been subclassed by SetClassLong(Ptr)W */ + /* If creating ansi Edit window & the class does not have a ansi proc, use unicode proc as ansi */ + if(!unicode && !IS_INTRESOURCE(name) && !strcmpiW( name, EDIT_builtin_class.name ) + && WINPROC_IsUnicode( win->winproc, 0 ) && WINPROC_IsUnicode( win->winproc, 1 )) + { + win->winproc = WINPROC_AllocProc((WNDPROC)WINPROC_GetProc( win->winproc, 1 ), NULL); + }
It doesn't seem likely that this behaviour just applies to edit controls. More likely, it applies to all builtin classes. -- Rob Shearman