USER: creating 16bit windows convert null instances to current process (try #3, should work now)

Joseph Garvin k04jg02 at kzoo.edu
Fri Jan 27 18:25:54 CST 2006


It's been a about a month since I sent this in and it still hasn't been 
applied. Is there something wrong with the patch?

Joseph Garvin wrote:

> Fixed up the patch according to Dmitry's suggestions :)
>
> Changelog
>   Fixed instance = 0 not converted to the current process when making a
> window. Broke menus in some apps. (Thanks to Mike)
>
>
>------------------------------------------------------------------------
>
>--- dlls/user/win.c.1	2005-12-31 03:03:19.000000000 -0700
>+++ dlls/user/win.c	2006-01-01 01:02:43.000000000 -0700
>@@ -1145,6 +1145,18 @@ HWND16 WINAPI CreateWindowEx16( DWORD ex
>     cs.cx = (width == CW_USEDEFAULT16) ? CW_USEDEFAULT : (INT)width;
>     cs.cy = (height == CW_USEDEFAULT16) ? CW_USEDEFAULT : (INT)height;
> 
>+    /* Correct if instance is null now, because later we won't
>+       be able to tell the difference between a 16-bit NULL and
>+       a 32-bit NULL */
>+
>+    if (!instance) 
>+    {
>+        HTASK16 hTask = GetCurrentTask();
>+        TDB *tdb = GlobalLock16(hTask);
>+        instance = tdb->hInstance;
>+        GlobalUnlock16(hTask);
>+    }
>+
>     /* Create the window */
> 
>     cs.lpCreateParams = data;
>  
>
>------------------------------------------------------------------------
>
>
>  
>




More information about the wine-devel mailing list