Release 970215

Sat Feb 15 11:59:17 1997  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [*/*]
	Converted a lot of functions to Win32 types.
	Removed HWND type.

Fri Feb 14 15:09:19 1997  Onno Hovers <onno@stack.nl>

	* [memory/global.c]
	Implemented GMEM_MOVEABLE blocks for Win32.

Fri Feb 14 00:24:39 1997  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [loader/task.c] [windows/queue.c]
	Do not read X events while in the intertask SendMessage().

	* [misc/lstr.c]
	Fixed CharPrev32A().

	* [windows/hook.c] [include/hook.h]
	Restored broken WH_CALLWNDPROC functionality for dialogs, etc...

	* [windows/win.c] [windows/defwnd.c] [windows/mdi.c]
	  [windows/event.c] [controls/edit.c] 
	Added WIN_ISWIN32 flag to windows created by Win32 calls. 
	Several new Win32 messages are sent when this flag is on.
	
	* [msdos/dosmem.c] [memory/global.c]
	Some changes in DOS memory allocation.

Fri Feb  7 21:46:03 1997  Andrew Taylor  <andrew@riscan.com>

	* [win32/security.c]
	Added SID manipulation functions.

	* [include/debug.h]
	Added debugging class "security".

Fri  Feb 7 20:46:33 1997  Robert Pouliot <krynos@clic.net>

	* [debugger/msc.c] [debugger/source.c] 
	  [documentation/wine_os2.txt] [loader/signal.c]
	Some more changes for OS/2. Doesn't work yet.

Fri  Feb 7 09:31:17 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [scheduler/process.c]
	Added ExpandEnvironmentStrings*.

	* [misc/ntdll.c] [include/ntdll.h]
	Added some new functions.

	* [objects/cursoricon.c]
	CURSORICON_LoadHandler: check against some bizarre out of memory
	conditions.
	
	* [windows/mdi.c]
	Fixed DefFrameProc32*, added TranslateMDISysAccel32.

Wed Feb  5 01:31:05 1997  John Zero <john@globe.graphisoft.hu>

	* [resources/sysres_Hu.rc] [misc/ole2nls.c] [misc/main.c]
	  [programs/progman/Hu.rc] [programs/winhelp/Hu.rc]
	Added Hungarian language support.
diff --git a/controls/edit.c b/controls/edit.c
index b333222..8e7b59f 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -98,7 +98,7 @@
 	INT32 SelStart;		/* offset of selection start, == SelEnd if no selection */
 	INT32 SelEnd;		/* offset of selection end == current caret position */
 	INT32 NumTabStops;
-	LPINT16 TabStops;
+	LPINT32 TabStops;
 	/*
 	 *	FIXME: The following should probably be a (VOID *) that is
 	 *	typecast to either 16- or 32-bit callback when used,
@@ -667,15 +667,8 @@
 		lResult = EDIT_WM_Command(wndPtr, wParam, lParam);
 		break;
 
-/*
- *	FIXME: when this one is added to WINE, change RBUTTONUP to CONTEXTMENU
- *	Furthermore, coordinate conversion should no longer be required
- *
- *	case WM_CONTEXTMENU:
- */
- 	case WM_RBUTTONUP:
-		DPRINTF_EDIT_MSG32("WM_RBUTTONUP");
-		ClientToScreen16(wndPtr->hwndSelf, (LPPOINT16)&lParam);
+ 	case WM_CONTEXTMENU:
+		DPRINTF_EDIT_MSG32("WM_CONTEXTMENU");
 		lResult = EDIT_WM_ContextMenu(wndPtr, wParam, lParam);
 		break;
 
@@ -865,7 +858,7 @@
 		es->LineDefs[0].offset = 0;
 		es->LineDefs[0].length = EDIT_WM_GetTextLength(wndPtr, 0, 0);
 		es->LineDefs[0].ending = END_0;
-		es->TextWidth = (INT32)LOWORD(GetTabbedTextExtent(hdc, text,
+		es->TextWidth = (INT32)LOWORD(GetTabbedTextExtent32A(hdc, text,
 					es->LineDefs[0].length,
 					es->NumTabStops, es->TabStops));
 	} else {
@@ -882,7 +875,7 @@
 				ending = END_HARD;
 				length = cp - start;
 			}
-			width = (INT32)LOWORD(GetTabbedTextExtent(hdc, start, length,
+			width = (INT32)LOWORD(GetTabbedTextExtent32A(hdc, start, length,
 						es->NumTabStops, es->TabStops));
 
 			if (IsWordWrap(wndPtr) && (width > ww)) {
@@ -891,7 +884,7 @@
 					prev = next;
 					next = EDIT_CallWordBreakProc(wndPtr, start,
 							prev + 1, length, WB_RIGHT);
-					width = (INT32)LOWORD(GetTabbedTextExtent(hdc, start, next,
+					width = (INT32)LOWORD(GetTabbedTextExtent32A(hdc, start, next,
 							es->NumTabStops, es->TabStops));
 				} while (width <= ww);
 				if (!prev) {
@@ -899,7 +892,7 @@
 					do {
 						prev = next;
 						next++;
-						width = (INT32)LOWORD(GetTabbedTextExtent(hdc, start, next,
+						width = (INT32)LOWORD(GetTabbedTextExtent32A(hdc, start, next,
 								es->NumTabStops, es->TabStops));
 					} while (width <= ww);
 					if(!prev) prev = 1;
@@ -911,7 +904,7 @@
 					ending = END_DELIMIT;
 				} else
 					ending = END_NONE;
-				width = (INT32)LOWORD(GetTabbedTextExtent(hdc, start, length,
+				width = (INT32)LOWORD(GetTabbedTextExtent32A(hdc, start, length,
 							es->NumTabStops, es->TabStops));
 			}
 
@@ -1786,13 +1779,13 @@
 	BkColor = GetBkColor32(hdc);
 	TextColor = GetTextColor32(hdc);
 	if (rev) {
-		SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
-		SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
+		SetBkColor(hdc, GetSysColor32(COLOR_HIGHLIGHT));
+		SetTextColor(hdc, GetSysColor32(COLOR_HIGHLIGHTTEXT));
 	}
 	text = EDIT_GetPasswordPointer(wndPtr);
 	li = (INT32)EDIT_EM_LineIndex(wndPtr, line, 0);
 	xoff = EDIT_GetXOffset(wndPtr);
-	ret = (INT32)LOWORD(TabbedTextOut(hdc, x, y, text + li + col, count,
+	ret = (INT32)LOWORD(TabbedTextOut32A(hdc, x, y, text + li + col, count,
 					es->NumTabStops, es->TabStops, -xoff));
 	free(text);
 	if (rev) {
@@ -1911,7 +1904,7 @@
 	if (hFont) oldFont = SelectObject32(hdc, hFont);
 	line = MAX(0, MIN(line, lc - 1));
 	col = MIN(col, ll);
-	ret = (INT32)LOWORD(GetTabbedTextExtent(hdc,
+	ret = (INT32)LOWORD(GetTabbedTextExtent32A(hdc,
 			text + li, col,
 			es->NumTabStops, es->TabStops)) - xoff;
 	if (hFont) SelectObject32(hdc, oldFont);
@@ -2910,7 +2903,6 @@
 static LRESULT EDIT_EM_SetTabStops(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
 {
 	EDITSTATE *es = EDITSTATEPTR(wndPtr);
-	INT32 i;
 
 	if (!IsMultiLine(wndPtr))
 		return FALSE;
@@ -2920,9 +2912,9 @@
 	if (!wParam)
 		es->TabStops = NULL;
 	else {
-		es->TabStops = (LPINT16)xmalloc(wParam * sizeof(INT16));
-		for ( i = 0 ; i < (INT32)wParam ; i++ )
-			es->TabStops[i] = (INT16)((LPINT32)lParam)[i];
+		es->TabStops = (LPINT32)xmalloc(wParam * sizeof(INT32));
+		memcpy( es->TabStops, (LPINT32)lParam,
+                        (INT32)wParam * sizeof(INT32) );
 	}
 	return TRUE;
 }
@@ -2936,6 +2928,7 @@
 static LRESULT EDIT_EM_SetTabStops16(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
 {
 	EDITSTATE *es = EDITSTATEPTR(wndPtr);
+	INT32 i;
 
 	if (!IsMultiLine(wndPtr))
 		return FALSE;
@@ -2944,10 +2937,11 @@
 	es->NumTabStops = (INT32)wParam;
 	if (!wParam)
 		es->TabStops = NULL;
-	else {
-		es->TabStops = (LPINT16)xmalloc(wParam * sizeof(INT16));
-		memcpy(es->TabStops, (LPINT16)PTR_SEG_TO_LIN(lParam),
-				(INT32)wParam * sizeof(INT16));
+	else
+        {
+            LPINT16 p = (LPINT16)PTR_SEG_TO_LIN(lParam);
+            es->TabStops = (LPINT32)xmalloc(wParam * sizeof(INT32));
+            for ( i = 0 ; i < (INT32)wParam ; i++) es->TabStops[i] = *p++;
 	}
 	return TRUE;
 }
@@ -3126,10 +3120,10 @@
 	text = EDIT_GetPointer(wndPtr);
 	lstrcpyn32A(dst, text + s, e - s + 1);
 	GlobalUnlock16(hdst);
-	OpenClipboard(wndPtr->hwndSelf);
-	EmptyClipboard();
+	OpenClipboard32(wndPtr->hwndSelf);
+	EmptyClipboard32();
 	SetClipboardData(CF_TEXT, hdst);
-	CloseClipboard();
+	CloseClipboard32();
 	return -1;
 }
 
@@ -3423,7 +3417,7 @@
 		((e - s) && !IsPassword(wndPtr) ? MF_ENABLED : MF_GRAYED));
 	/* paste */
 	EnableMenuItem32(hPopup, 4, MF_BYPOSITION |
-		(IsClipboardFormatAvailable(CF_TEXT) ? MF_ENABLED : MF_GRAYED));
+		(IsClipboardFormatAvailable32(CF_TEXT) ? MF_ENABLED : MF_GRAYED));
 	/* delete */
 	EnableMenuItem32(hPopup, 5, MF_BYPOSITION |
 		((e - s) ? MF_ENABLED : MF_GRAYED));
@@ -3694,7 +3688,7 @@
 		oldFont = (HFONT32)SelectObject32(hdc, hFont);
 	EDIT_SEND_CTLCOLOR(wndPtr, hdc);
 	if (!IsWindowEnabled32(wndPtr->hwndSelf))
-		SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
+		SetTextColor(hdc, GetSysColor32(COLOR_GRAYTEXT));
 	GetClipBox32(hdc, &rcRgn);
 	for (i = fv ; i <= MIN(fv + vlc, fv + lc - 1) ; i++ ) {
 		EDIT_GetLineRect(wndPtr, i, 0, -1, &rcLine);
@@ -3722,13 +3716,13 @@
 	HGLOBAL16 hsrc;
 	LPSTR src;
 
-	OpenClipboard(wndPtr->hwndSelf);
+	OpenClipboard32(wndPtr->hwndSelf);
 	if ((hsrc = GetClipboardData(CF_TEXT))) {
 		src = (LPSTR)GlobalLock16(hsrc);
 		EDIT_EM_ReplaceSel(wndPtr, (WPARAM32)TRUE, (LPARAM)src);
 		GlobalUnlock16(hsrc);
 	}
-	CloseClipboard();
+	CloseClipboard32();
 	return -1;
 }
 
@@ -3741,7 +3735,7 @@
 static LRESULT EDIT_WM_SetCursor(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
 {
 	if (LOWORD(lParam) == HTCLIENT) {
-		SetCursor(LoadCursor16(0, IDC_IBEAM));
+		SetCursor16(LoadCursor16(0, IDC_IBEAM));
 		return -1;
 	} else
 		return 0;
@@ -3763,7 +3757,7 @@
 	EDIT_SetSel(wndPtr, s, e);
 	if(!(wndPtr->dwStyle & ES_NOHIDESEL))
 		EDIT_InvalidateText(wndPtr, s, e);
-	ShowCaret(wndPtr->hwndSelf);
+	ShowCaret32(wndPtr->hwndSelf);
 	dprintf_edit(stddeb, "edit: notification EN_SETFOCUS sent\n");
 	EDIT_NOTIFY_PARENT(wndPtr, EN_SETFOCUS);
 	return 0;
@@ -3800,7 +3794,7 @@
 		DestroyCaret();
 		CreateCaret(wndPtr->hwndSelf, 0, 2, EDIT_GetLineHeight(wndPtr));
 		EDIT_SetSel(wndPtr, s, e);
-		ShowCaret(wndPtr->hwndSelf);
+		ShowCaret32(wndPtr->hwndSelf);
 	}
 	return 0;
 }