http://bugs.winehq.org/show_bug.cgi?id=14350
--- Comment #3 from Hongbo Ni hongbo@njstar.com 2008-07-08 08:15:21 --- I suspect this is how micrsoft window works regarding to SetClassLongW(hEditWnd, GCL_WNDPROC,(DWORD)EditWndProc);
------/user32/class.c line 910 in CLASS_SetClassLong() ---------- + if (the class of hEditWnd has both ProcA and ProcW) { + class->winproc = WINPROC_AllocProc((WNDPROC)newval,(WNDPROC)newval); + }else{ class->winproc = WINPROC_AllocProc( unicode ? NULL : (WNDPROC)newval, unicode ? (WNDPROC)newval : NULL ); + } ----------------------------------------------------------------------
This means if you subclass a built-in class with SetClassLongW(h,GCL_WNDPROC,Proc) the Proc provided must be able to handle both ANSI and Unicode Edit Msg.
This is what I have done in my EditWndProc using IsWindowUnicode() to distingush ANSI or Unicode Windows message.