[Bug 14350] SetClassLongW() to subclass window EDIT control Problem

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jul 8 08:15:21 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=14350





--- Comment #3 from Hongbo Ni <hongbo at 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.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list