user32: Add a test for reparenting a WS_POPUP window to a WS_CHILD parent.

Dmitry Timoshkov dmitry at
Fri Feb 4 05:19:46 CST 2011

Joris Huizer <joris_huizer at> wrote:

> > -    ret = DestroyWindow(parent);
> > -    ok( ret, "DestroyWindow() error %d\n",
> > GetLastError());
> > +    ok(DestroyWindow(parent), "DestroyWindow()
> > error %d\n", GetLastError());
> Please don't merge the call with the ok() statement; the GetLastError() call might be executed before the function to be tested, thus giving the old value. (There has been some cleaning up for this issue recently)
> The same goes for a few tests you added:

That's no the point of the test, and actually ok() calls are just a sinity
check in this case,  GetLastError() results are not interesting, since
the previous calls should never fail. There are many other places which do
that already, feel free to send patches to correct them.


More information about the wine-devel mailing list