Release 960824

Sat Aug 24 13:57:01 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/scroll.c]
	Renamed SCROLLINFO to SCROLLBAR_INFO to avoid conflict with Win32.

	* [graphics/driver.c] [include/x11drv.h]
	New files for graphics driver handling.

	* [if1632/relay.c] [include/registers.h] [tools/build.c]
	Implemented Win32 register functions. Not really tested yet.

	* [include/gdi.h]
	Added a lot of functions to the DC func table.

	* [loader/pe_image.c]
	Initialise %fs before calling out to 32-bit code.

	* [windows/hook.c]
	Fixed bug in HOOK_GetHook().

	* [windows/win.c]
	Fixed FindWindow to return an error if the class name doesn't exist.

Wed Aug 21 15:15:53 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [if1632/Makefile.in] [misc/mpr.c] [if1632/mpr.spec]
	mpr.dll specs added.

	* [if1632/kernel32.spec] [win32/newfns.c] [memory/global.c]
	QueryPerformanceCounter(), GlobalMemoryStatus() added.

	* [if1632/user32.spec] [win32/error.c]
	SetLastErrorEx() added.

	* [misc/commdlg.c]
	lpstrFilter might be NULL in FILE_WMInitDialog (NS 3.0 setup).

	* [misc/registry.c]
	Some missing NULL ptr checks added, misc clean up.

Tue Aug 20 21:00:00 1996 Alex Korobka  <alex@pharm.sunysb.edu>

	* [controls/menu.c]
	Adjust popup menu coordinates so that it always stays within 
	the desktop.

	* [misc/main.c]
	Fixed GetEnvironment() return value for lpEnv == NULL case.

Mon Aug 19 22:48:36 1996  Jukka Iivonen <iivonen@cc.helsinki.fi>

	* [misc/crtdll.c] [if1632/crtdll.spec]
	Added some is* functions, strlen and tolower.
	
Mon Aug 19 13:33:13 1996  Stephen Simmons  <ssimmons@vitsemi.com>

	* [tools/wineconf]
	New perl script to generate the wine.conf file.

Fri Aug 16 15:31:44 1996   John Harvey <john@division.co.uk>

	* [if1632/gdi.spec]
        Lots of printer functions.
	
	* [include/callback.h]
        New functions for printer driver support.

	* [include/gdi.h]
        New/changed structures to support printer driver.

	* [misc/escape.c]
        New version that uses function table in DC structure.

	* [objects/dc.c]
        CreateDC copes with things other than Display.
	X code for CreateDC moved to graphics/x11drv directory.
	CreateCompatibleDC copies func table from original DC.

	* [objects/font.c]
        GetTextExtentPoint32A,GetTextMetrics16 use function table in
        DC and code moved to drivers directory.

	* [misc/printdrv.c] [graphics/*/*] [include/win16drv.h]
        New files for printer support. 

Fri Aug 16 12:33:00 1996  Bruce Milner <Bruce.Milner@genetics.utah.edu>

	* [controls/scroll.c]
	Added SetScrollInfo32 and GetScrollInfo32.  These just call existing
	code. There are a few options in which I'm probably the wrong person
	for the job (page size and disable bar). There are comments in the
	code as to what they should do.

	* [objects/gdiobj.c] [objects/font.c] [include/font.h]
	Added 32 bit version of FONT_GetObject.
diff --git a/windows/hook.c b/windows/hook.c
index a8bc38b..f29bf4b 100644
--- a/windows/hook.c
+++ b/windows/hook.c
@@ -51,7 +51,7 @@
     MESSAGEQUEUE *queue;
     HANDLE16 hook = 0;
 
-    if ((queue = (MESSAGEQUEUE *)GlobalLock16( GetTaskQueue(hQueue) )) != NULL)
+    if ((queue = (MESSAGEQUEUE *)GlobalLock16( hQueue )) != NULL)
         hook = queue->hooks[id - WH_FIRST_HOOK];
     if (!hook) hook = HOOK_systemHooks[id - WH_FIRST_HOOK];
     return hook;
@@ -208,7 +208,7 @@
  */
 LRESULT HOOK_CallHooks( INT16 id, INT16 code, WPARAM16 wParam, LPARAM lParam )
 {
-    HANDLE16 hook = HOOK_GetHook( id , 0 );
+    HANDLE16 hook = HOOK_GetHook( id , GetTaskQueue(0) );
     if (!hook) return 0;
     return HOOK_CallHook( hook, code, wParam, lParam );
 }
diff --git a/windows/message.c b/windows/message.c
index 4d5b558..4624478 100644
--- a/windows/message.c
+++ b/windows/message.c
@@ -614,10 +614,10 @@
             {
                 BOOL32 ret;
                 *pmsg = *msg;
-                ret = (HOOK_CallHooks( WH_SYSMSGFILTER, code, 0,
-                                       (LPARAM)SEGPTR_GET(pmsg) ) ||
-                       HOOK_CallHooks( WH_MSGFILTER, code, 0,
-                                       (LPARAM)SEGPTR_GET(pmsg) ));
+                ret = ((BOOL16)HOOK_CallHooks( WH_SYSMSGFILTER, code, 0,
+                                               (LPARAM)SEGPTR_GET(pmsg) ) ||
+                       (BOOL16)HOOK_CallHooks( WH_MSGFILTER, code, 0,
+                                               (LPARAM)SEGPTR_GET(pmsg) ));
                 SEGPTR_FREE(pmsg);
                 if (ret)
                 {
diff --git a/windows/property.c b/windows/property.c
index 4b0796b..089d35b 100644
--- a/windows/property.c
+++ b/windows/property.c
@@ -63,8 +63,13 @@
 {
     PROPERTY *prop = PROP_FindProp( hwnd, str );
 
-    dprintf_prop( stddeb, "GetProp(%08x,'%s'): returning %08x\n",
-                  hwnd, str, prop ? prop->handle : 0 );
+    if (HIWORD(str))
+        dprintf_prop( stddeb, "GetProp(%08x,'%s'): returning %08x\n",
+                      hwnd, str, prop ? prop->handle : 0 );
+    else
+        dprintf_prop( stddeb, "GetProp(%08x,#%04x): returning %08x\n",
+                      hwnd, LOWORD(str), prop ? prop->handle : 0 );
+
     return prop ? prop->handle : 0;
 }
 
@@ -101,7 +106,12 @@
 {
     PROPERTY *prop;
 
-    dprintf_prop( stddeb, "SetProp: %04x '%s' %08x\n", hwnd, str, handle );
+    if (HIWORD(str))
+        dprintf_prop( stddeb, "SetProp: %04x '%s' %08x\n", hwnd, str, handle );
+    else
+        dprintf_prop( stddeb, "SetProp: %04x #%04x %08x\n",
+                      hwnd, LOWORD(str), handle );
+
     if (!(prop = PROP_FindProp( hwnd, str )))
     {
         /* We need to create it */
diff --git a/windows/win.c b/windows/win.c
index 95e7923..cbca5aa 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -1023,9 +1023,14 @@
 HWND16 FindWindowEx16( HWND16 parent, HWND16 child,
                        SEGPTR className, LPCSTR title )
 {
-    ATOM atom;
+    ATOM atom = 0;
 
-    atom = className ? GlobalFindAtom16( className ) : 0;
+    if (className)
+    {
+        /* If the atom doesn't exist, then no class */
+        /* with this name exists either. */
+        if (!(atom = GlobalFindAtom16( className ))) return 0;
+    }
     return WIN_FindWindow( parent, child, atom, title );
 }
 
@@ -1045,9 +1050,14 @@
 HWND32 FindWindowEx32A( HWND32 parent, HWND32 child,
                         LPCSTR className, LPCSTR title )
 {
-    ATOM atom;
+    ATOM atom = 0;
 
-    atom = className ? GlobalFindAtom32A( className ) : 0;
+    if (className)
+    {
+        /* If the atom doesn't exist, then no class */
+        /* with this name exists either. */
+        if (!(atom = GlobalFindAtom32A( className ))) return 0;
+    }
     return WIN_FindWindow( 0, 0, atom, title );
 }
 
@@ -1058,11 +1068,16 @@
 HWND32 FindWindowEx32W( HWND32 parent, HWND32 child,
                         LPCWSTR className, LPCWSTR title )
 {
-    ATOM atom;
+    ATOM atom = 0;
     char *buffer;
     HWND hwnd;
 
-    atom = className ? GlobalFindAtom32W( className ) : 0;
+    if (className)
+    {
+        /* If the atom doesn't exist, then no class */
+        /* with this name exists either. */
+        if (!(atom = GlobalFindAtom32W( className ))) return 0;
+    }
     buffer = title ? STRING32_DupUniToAnsi( title ) : NULL;
     hwnd = WIN_FindWindow( 0, 0, atom, buffer );
     if (buffer) free( buffer );