Release 960521

Tue May 21 14:06:07 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/button.c]
	Made ButtonWndProc a 32-bit window procedure.

	* [controls/desktop.c]
	Made DesktopWndProc a 32-bit window procedure.
	Added handling of WM_SETCURSOR.

	* [controls/menu.c]
	Allocate menu items and strings on the 32-bit system heap.
	Implemented Win32 versions for ChangeMenu, InsertMenu, ModifyMenu,
	AppendMenu and LoadMenuIndirect.

	* [controls/widgets.c]
	Added possibility to have 32-bit built-in classes.

	* [files/drive.c]
	Implemented GetLogicalDrive() and GetLogicalDriveStrings().

	* [misc/spy.c] [include/spy.h]
	Added support for spying Win32 messages.

	* [loader/builtin.c]
	Fixed bug in -dll option parsing.

	* [memory/local.c]
	Added back the change by Huw D. M. Davies to free the block in
	LocalRealloc() before allocating the new one.

	* [objects/bitmap.c] [objects/cursoricon.c] [objects/oembitmap.c]
	Fixed bug in bitmap size that caused memory corruption for 24bpp.

	* [windows/defwnd.c]
	Implemented Win32 version of DefWindowProc().

	* [windows/dialog.c]
	Implemented Win32 version of SendDlgItemMessage,
	Get/SetDlgItemText and Get/SetDlgItemInt.

	* [windows/mdi.c]
	Implemented Win32 version of DefFrameProc() and DefMDIChildProc().
	Don't make a copy of the OBM bitmaps for every MDI window.

	* [windows/message.c]
	Implemented Win32 version of SendMessage().
	
	* [windows/winproc.c] [windows/class.c] [windows/win.c]
	New scheme for 32-bit window procedures to replace aliases. All
	32-bit window procedure get a 16-bit address pointing to a
	WINDOWPROC structure.
	Implemented Ansi<->Unicode translation for CallWindowProc().
	Added translation of WM_DRAWITEM between Win16 and Win32.

	* [windows/win.c] [include/callback.h]
	Added ugly hack to build CREATESTRUCT on the stack when sending
	WM_NCCREATE.
	Implemented Win32 version of Get/SetWindowWord/Long and
	Get/SetWindowText.
	
Fri May 17 10:20:16 1996  Albrecht Kleine  <kleine@ak.sax.de>

	* [controls/button.c]
	Avoid gray text on gray background in disabled push buttons
	using a b/w raster and some raster operations (PatBlt,BitBlt).

	* [objects/text.c]
	DrawText(): don't draw an underbar anymore if DT_CALCRECT is set.
diff --git a/loader/builtin.c b/loader/builtin.c
index 33ea613..e261ab0 100644
--- a/loader/builtin.c
+++ b/loader/builtin.c
@@ -148,12 +148,12 @@
     { &OLE32_Descriptor,    0 },
     { &GDI32_Descriptor,    0 },
     { &KERNEL32_Descriptor, DLL_FLAG_ALWAYS_USED },
-    { &NTDLL_Descriptor,  0 },
+    { &NTDLL_Descriptor,    0 },
     { &SHELL32_Descriptor,  0 },
     { &USER32_Descriptor,   0 },
     { &WPROCS32_Descriptor, DLL_FLAG_ALWAYS_USED },
     { &WINSPOOL_Descriptor, 0 },
-    { &WSOCK32_Descriptor, 0 },
+    { &WSOCK32_Descriptor,  0 },
     /* Last entry */
     { NULL, 0 }
 };
@@ -404,6 +404,7 @@
         }
         if (!dll->descr) return FALSE;
         str = p;
+        while (*str && (isspace(*str) || (*str == ','))) str++;
     }
     return TRUE;
 }
diff --git a/loader/main.c b/loader/main.c
index 18ecdfe..bc3ac02 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -11,7 +11,6 @@
 #include <string.h>
 #include <errno.h>
 #include "windows.h"
-#include "alias.h"
 #include "module.h"
 #include "selectors.h"
 #include "comm.h"
@@ -112,9 +111,6 @@
       /* GDI initialisation */
     if (!GDI_Init()) return 0;
 
-    /* Initialise window procedures aliases */
-    if (!ALIAS_Init()) return 0;
-
       /* Initialize system colors and metrics*/
     SYSMETRICS_Init();
     SYSCOLOR_Init();
diff --git a/loader/module.c b/loader/module.c
index e047415..f6638fd 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -762,11 +762,14 @@
 FARPROC16 MODULE_GetWndProcEntry16( const char *name )
 {
     WORD ordinal;
+    FARPROC16 ret;
     static HMODULE hModule = 0;
 
     if (!hModule) hModule = GetModuleHandle( "WPROCS" );
     ordinal = MODULE_GetOrdinal( hModule, name );
-    return MODULE_GetEntryPoint( hModule, ordinal );
+    if (!(ret = MODULE_GetEntryPoint( hModule, ordinal )))
+        fprintf( stderr, "GetWndProc16: %s not found, please report\n", name );
+    return ret;
 }
 #endif
 
@@ -779,10 +782,13 @@
 #ifndef WINELIB
 FARPROC32 MODULE_GetWndProcEntry32( const char *name )
 {
+    FARPROC32 ret;
     static HMODULE hModule = 0;
 
     if (!hModule) hModule = GetModuleHandle( "WPROCS32" );
-    return PE_GetProcAddress( hModule, name );
+    if (!(ret = PE_GetProcAddress( hModule, name )))
+        fprintf( stderr, "GetWndProc32: %s not found, please report\n", name );
+    return ret;
 }
 #endif
 
diff --git a/loader/pe_image.c b/loader/pe_image.c
index 04d57bb..fffff8a 100644
--- a/loader/pe_image.c
+++ b/loader/pe_image.c
@@ -24,7 +24,6 @@
 #include "peexe.h"
 #include "pe_image.h"
 #include "module.h"
-#include "alias.h"
 #include "global.h"
 #include "task.h"
 #include "ldt.h"
@@ -538,8 +537,6 @@
 	HINSTANCE hInstance;
         struct mz_header_s mz_header;
 
-	ALIAS_UseAliases=1;
-
 	lseek(fd,0,SEEK_SET);
 	read( fd, &mz_header, sizeof(mz_header) );
 
diff --git a/loader/resource.c b/loader/resource.c
index 6ebfd69..56de36f 100644
--- a/loader/resource.c
+++ b/loader/resource.c
@@ -330,7 +330,7 @@
 		if(GetKeyState(VK_MENU) & 0x8000) mask |= ALT_ACCEL;
 		if(mask == (lpAccelTbl->tbl[i].type &
 			    (SHIFT_ACCEL | CONTROL_ACCEL | ALT_ACCEL))) {
-		    SendMessage(hWnd, WM_COMMAND, lpAccelTbl->tbl[i].wIDval,
+		    SendMessage16(hWnd, WM_COMMAND, lpAccelTbl->tbl[i].wIDval,
 				0x00010000L);
 		    GlobalUnlock16(hAccel);
 		    return 1;
@@ -342,7 +342,7 @@
 	else {
 	    if (msg->wParam == lpAccelTbl->tbl[i].wEvent &&
 		msg->message == WM_CHAR) {
-		SendMessage(hWnd, WM_COMMAND, lpAccelTbl->tbl[i].wIDval, 0x00010000L);
+		SendMessage16(hWnd, WM_COMMAND, lpAccelTbl->tbl[i].wIDval, 0x00010000L);
 		GlobalUnlock16(hAccel);
 		return 1;
 		}
diff --git a/loader/task.c b/loader/task.c
index 52be7a7..44443f6 100644
--- a/loader/task.c
+++ b/loader/task.c
@@ -1064,12 +1064,14 @@
  */
 HTASK GetCurrentTask(void)
 {
-      /* Undocumented: first task is returned in high word */
-#ifdef WINELIB32
     return hCurrentTask;
-#else
+}
+
+DWORD WIN16_GetCurrentTask(void)
+{
+    /* This is the version used by relay code; the first task is */
+    /* returned in the high word of the result */
     return MAKELONG( hCurrentTask, hFirstTask );
-#endif
 }