And if you check the definition of TREEVIEW_SendTreeviewNotify, you see:
nmhdr.hdr.code = get_notifycode(infoPtr, code);
So no modifications are necessary, right?
D'oh. The way this windows unicode stuff works behind the scenes is pretty confusing, I assumed if you specified it with a W or A extension that's the one it'd use, clearly not. Sorry :(
IsWindowUnicode() could well be correct and the bug lies elsewhere. But
How can that be, if we get different results than on Windows?
Well the bug might be in window creation or class registration I suppose. As IsWindowUnicode on Wine just checks the window proc type, and WinAmp on wine uses a W wndproc but an A wndproc on Windows, I'd guess it's in class registration or window creation though.
WinAmp calls CreateWindowExW, which means a unicode winproc, so it should be correct. That means either the wrong CreateWindowEx is being called (is it possible?), or the logic for determining whether a window is unicode or not is more complex than just "what type is the wndproc?".
That seems to be the case, yes. Maybe they look somehow at the type of executable? Is there anything about Unicode in the executable?
This is the MSDN page for IsWindowUnicode():
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui...
Unfortunately, parts of it appear to have been written by somebody who was either exhausted or stoned, for instance the part about 9x behaviour. The unicode page link is 404d also.
It implies that the character set of a window is determined by
* on 9x, which CreateWindowExA/W call was used. * or which RegisterClassA/W call was used.
Well, WinAmp seems to use CreateWindowExW to create the window, but I can't find where the window class is registered, it doesn't seem to appear in a +class trace anywhere. The string name is "#32770", so maybe it's internal.
So anyway, I'm not sure where the character set of the wndproc is determined, but perhaps the set of the RegisterClass call should take priority over CreateWindowEx and in Wine it doesn't. I'll see if I can find where the window class WinAmp uses is registered tomorrow if nobody knows.
Could somebody explain whether Wine is supposed to be closer to NT or 9x? When there are two conflicting behaviours, do we go with the NT one or the 9x one (or both)?
thanks -mike