user32: Problem using SetClassLongW to subclass built-in control (Edit)

Hongbo Ni hongbo_ni at
Sun Jul 13 00:43:14 CDT 2008

Hi Everyone,
It turns out my previous patch was not right to solve the problem.
After writing a win32 application for debuging the impact of SetClassLongW, 
I found out that something is abnormal in windows.
After a built-in class (which has procA and procW) is subclassed by
SetClassLong(Ptr)W(hWnd, GCL_WNDPROC, newProcW);
If you create a window of the same built-in class (such as Edit) using CreateWindow(Ex)A,
the created window got it's wnd.procA = class.newProcW. The created window is Ansi.
That is right, the newProcW is going to receive Ansi message - [ABNORMAL].
I have captured the debug screen, here is the screenshot
Where in Wine, created window is Unicode, with wnd.procW = class.newProcW.
newProcW will only receive Unicode message.
That is the difference between Window and Wine regarding to subclass built-in control.
This observation explains exactly what I have seen in my App.
With this knowledge it's now easy to create the patch.
Windows Live Messenger treats you to 30 free emoticons - Bees, cows, tigers and more!
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the wine-devel mailing list