Adam Martinson <adam.r.martinson(a)gmail.com> wrote:
> +static HDC (WINAPI *pGetWindowDC)(HWND hWnd);
> +static int (WINAPI *pReleaseDC)(HWND hWnd,HDC hDC);
There is no need to dynamically import these APIs, they are always available.
> +static DWORD WINAPI test_ulw_thread(void *data)
> +{
> + struct test_ulw_tdata *tdata = data;
> + DWORD res;
> +
> + res = WaitForSingleObject( tdata->hSem, 1000 );
> + ok( !res, "wait for semaphore failed: %08x\n", res );
> + if (!res)
> + {
> + HDC hdc = pGetWindowDC( tdata->hwnd );
> + res = pUpdateLayeredWindow( tdata->hwnd, 0, NULL, tdata->psz, hdc, tdata->ppt, 0, NULL, ULW_OPAQUE );
> + ok( res, "UpdateLayeredWindow failed: %08x\n", GetLastError() );
> + pReleaseDC( tdata->hwnd, hdc );
> + }
> +
> + return res;
> +}
I don't see how this is supposed to test what you presumably are trying to
fix. A bunch of message tests that calls UpdateLayeredWindow with various
flags and parameters and compares window extents before and after the call
would be more convincing IMO.
--
Dmitry.