<br><br><div class="gmail_quote">2012/11/9 Alexandre Julliard <span dir="ltr"><<a href="mailto:julliard@winehq.org" target="_blank">julliard@winehq.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Christian Costa <<a href="mailto:titan.costa@gmail.com">titan.costa@gmail.com</a>> writes:<br>
<br>
> +    SetLastError(0xdeadbeef);<br>
> +    n = MapWindowPoints(wnd, NULL, NULL, 0);<br>
> +    err = GetLastError();<br>
> +    ok(n == ((window_rect.top << 16) | window_rect.left), "Got %x (%d, %d), expected %x (%d, %d)\n",<br>
> +       n, (n << 16) >> 16, n >> 16, window_rect.left, window_rect.top, (window_rect.top << 16) | window_rect.left);<br>
> +    ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);<br>
> +<br>
> +    SetLastError(0xdeadbeef);<br>
> +    n = MapWindowPoints(NULL, wnd, NULL, 0);<br>
> +    err = GetLastError();<br>
> +    ok(n == ((-window_rect.top << 16) | (-window_rect.left & 0xffff)), "Got %x (%d, %d), expected %x (%d, %d)\n",<br>
> +       n, (n << 16) >> 16, n >> 16, (-window_rect.top << 16) | (-window_rect.left & 0xffff), -window_rect.left, -window_rect.top);<br>
> +    ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);<br>
<br>
</div>Testing last error on success is not useful. Also please use MAKELONG<br>
and related macros instead of doing it by hand.<br>
<span class="HOEnZb"><font color="#888888"><br><br></font></span></blockquote><div><br></div><div>I can't use LOWORD as the signed bit is not propagated with & 0xffff.</div></div><br>