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 http://www.njstar.com/devimg/SetClassLongW-debug.png
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! http://livelife.ninemsn.com.au/article.aspx?id=567534