"Peter Oberndorfer" <[EMAIL PROTECTED]> wrote:

> First i create a window with  CreateWindowEx and pass 0 as instance.
> When trying to read the instance with GetWindowLong(hWnd,GWL_HINSTANCE)
> # Wine returns 0 as passed to the function.
> # Win 98 returns 0x400000 which is what GetModuleHandle( NULL ) gives me.
> 
> For the CreateWindowEx{A,W} it can easily be fixed by adding this two 
> lines at the beginning of the function:
> 
>     if (instance == 0)
>         instance = GetModuleHandleW( NULL );

You need to add a small test case for that in dlls/user/tests/win.c
and make sure that it passes at least on one flavor of Win9x and NT.

Then submit a fix and a new test case.

>     if (!HINSTANCE_32(instance))
>         instance = HINSTANCE_32(GetModuleHandle16(NULL));
> 
> So does the code for CreateWindowEx16 look right?

For me it looks OK.

-- 
Dmitry.



Reply via email to