Francois Gouget fgouget@free.fr writes:
This test uses {Get,Set}WindowLongW which of course does not work on Win9x, thus causing the test to fail. I guess part of the goal is to check that mixing Ansi calls (CreatewindowExA) with Unicode calls works.
No, there's no real reason to use the W call since we only set parent and style. We might as well replace all calls by the A version.
So I wrote a function test_set_window_long function that calls SetWindowLongW and then SetWindowLongA and checks that their results match but that causes the test to fail (at least on NT4 and Wine). More precisely even if all this function does is the following, then the test fails:
{ LONG rc=SetWindowLongA(hwnd,nIndex,dwNewLong); SetWindowLongA(hwnd,nIndex,dwNewLong); return rc; }
Comment out the second SetWindowLongA and it works. Why would calling SetWindowLong a second time make any difference?
The behavior of SetWindowLong(GWL_HWNDPARENT) depends on the current parent, so calling it a second time with the same arguments is not necessarily a nop.