On March 17, 2003 06:57 am, Mike Hearn wrote:
I know in November Dimi was having fun with this sort of thing, and that in Windows the listview at any rate reports this kind of thing incorrectly. Dimi, do you have any tips?
Yes, I don't think this patch is right. Here is the problem:
Common controls send notifications back to the parent. These notifications can be either Unicode or ANSI. The documented way of choosing which format to use is through the WM_NOTIFYFORMAT message, which is send to the parent upon control creation.
This sounds fairly simple, and it's exactly what our controls do. Until sometimes in Nov 2002, when Aric Stewart posted this: http://www.winehq.com/hypermail/wine-devel/2002/11/1167.html That is, it seems like the listview always sends notifications in ANSI, no matter what you do! This obviously doesn't make much sense, but Aric said he tested it, and that's how it works. As a result he posted this patch, which latter got into the tree: http://www.winehq.com/hypermail/wine-patches/2002/11/0276.html
At the time I was trying to figure out a similar problem in the Treeview, whereas putty broke when we did the 'right' thing and started sending Unicode notifications. It seemed then obvious to me that the fix would be to translate all notifications back to ANSI, as in the listview case, but for some unknown reason that did not fix Putty on my box, so I never sent the patch. (BTW, if you want to play with this idea, the thing to do is to modify the get_notifycode() function, not the callers).
In Fec 2003, Drew "DanteAliegri" Ogle dantealiegri@umbc.edu started looking into this problem, and I told him the story. He wasn't too impressed (and rightfully so!), and he maintained that the Unicode notifications are actually sent. I asked him if he can run some tests, and he did. Here is what he found:
So, this rather simple testcase shows that at least in XP.. The executables are at http://open-socket.dyndns.org/~dante/execs.tar.bz2 atest recieves TVN_SELCHANGEDA and wtest recieves TVN_SELCHANGEDW
Also , http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla... may be useful.
In the remarks section it addresses this problem.
I've attached the test program to this message, in case anyone wants to play with it. It would be very interesing if people ran the two executables that Drew provided on different versions of Windows, and see what we get. Also, it would be more than interesting if we could modify the tests to create a listview instead, and see if the listview never sends a Unicode notification.