Release 970305

Sun Mar  2 14:57:37 1997  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [*/*]
	Completed transition to new Win32 types.

	* [tools/build.c]
	Changed CallTo16_regs to take a CONTEXT argument.

	* [memory/virtual.c]
	Rewrote Virtual* functions. Implemented CreateFileMapping and
	OpenFileMapping. Broke MapViewOfFile ;-)

	* [win32/k32obj.c]
	Implemented named objects.

Sun Mar  2 00:33:21 1997  Mikolaj Zalewski <zmikolaj@free.polbox.pl>

	* [misc/ole2nls.c] [resources/sysres_Pl.c]
	Added Polish language support.

Sat Mar  1 13:31:25 1997  David Faure <david.faure@ifhamy.insa-lyon.fr>

	* [windows/keyboard.c]
	Wrote VkKeyScan and tested with Winword. Works ok except for dead
	chars.

Fri Feb 28 09:34:03 1997  John Harvey <john@division.co.uk>

	* [graphics/win16drv/font.c] [graphics/win16drv/init.c]
	  [graphics/win16drv/obects.c]
	Added start of SelectObject call for printer driver. Write should
	now run with the printer driver enabled.

Wed Feb 26 20:03:32 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [debugger/*.c]
	Re-added a disassembly command (list serves another functionality
	now).

	* [loader/pe_resource.c]
	Added # support.

	* [misc/ole2nls.c]
	GetStringType* added.

	* [objects/color.c]
	VGA16 fixes.

	* [windows/class.c]
	Look for global widget classes too in GetClassInfo32.

	* [windows/sysmetrics.c] [include/windows.h]
	Added Win32 sysmetrics.

Sat Feb 22 23:56:29 1997  Jukka Iivonen <iivonen@cc.helsinki.fi>

	* [documentation/languages]
	The fourth case updated.

	* [if1632/ntdll.spec]
	Added some is* and to* functions.

Sat Feb 22 23:05:47 1997  Morten Welinder  <terra@diku.dk>

	* [configure.in]
	Add tests for wait4 and waitpid.

	* [loader/signal.c]
	Clean up OS-dependent code.  I hope I got it right, :-)

	* [tools/wineconf]
	Recognise vfat file systems.  Ignore floppy drives specified in
	/etc/fstab.

	* [files/*]
	Fix function names in error messages.

Sat Feb 22 06:15:13 1997  Pablo Saratxaga <srtxg@chanae.stben.be>

	* [windows/keyboard.c] [windows/message.c]
	Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9}
	characters sets.

Fri Feb 21 20:37:50 1997  Huw D M Davies <h.davies1@physics.oxford.ac.uk>

	* [controls/edit.c]
	Fix incorrect arg order in LOCAL_Alloc() call.

Fri Feb 21 18:19:17 1997  Andrew Taylor  <andrew@riscan.com>

	* [multimedia/mmsystem.c] [multimedia/mcistring.c]
	Fixed bug related to device IDs returned by multimedia
	system.  Implemented mciGetDeviceID.

Sat Feb 15 00:58:19 1997  Jimen Ching  <jching@aloha.com>

	* [debugger/dbg.y]
	Do not dereference invalid expressions.
diff --git a/controls/button.c b/controls/button.c
index 92759b7..2058887 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -303,9 +303,9 @@
             PB_PaintGrayOnGray(hDC,infoPtr->hFont,&rc,wndPtr->text);
         else
         {
-            SetTextColor( hDC, (wndPtr->dwStyle & WS_DISABLED) ?
-                                GetSysColor32(COLOR_GRAYTEXT) :
-                                GetSysColor32(COLOR_BTNTEXT) );
+            SetTextColor32( hDC, (wndPtr->dwStyle & WS_DISABLED) ?
+                                 GetSysColor32(COLOR_GRAYTEXT) :
+                                 GetSysColor32(COLOR_BTNTEXT) );
             DrawText32A( hDC, wndPtr->text, -1, &rc,
                          DT_SINGLELINE | DT_CENTER | DT_VCENTER );
             /* do we have the focus? */
@@ -338,10 +338,10 @@
 
 void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
 {
-    static int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55};
-    HBITMAP16 hbm  = CreateBitmap(8, 8, 1, 1, Pattern);
+    static const int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55};
+    HBITMAP32 hbm  = CreateBitmap32( 8, 8, 1, 1, Pattern );
     HDC32 hdcMem = CreateCompatibleDC32(hDC);
-    HBITMAP16 hbmMem;
+    HBITMAP32 hbmMem;
     HBRUSH16 hBr;
     RECT32 rect,rc2;
 
@@ -350,7 +350,7 @@
     rc2=rect;
     rect.left=(rc->right-rect.right)/2;       /* for centering text bitmap */
     rect.top=(rc->bottom-rect.bottom)/2;
-    hbmMem = CreateCompatibleBitmap( hDC,rect.right,rect.bottom);
+    hbmMem = CreateCompatibleBitmap32( hDC,rect.right,rect.bottom );
     SelectObject32( hdcMem, hbmMem);
     hBr = SelectObject32( hdcMem, CreatePatternBrush32(hbm) );
     DeleteObject32( hbm );
@@ -417,7 +417,7 @@
         if( textlen && action != ODA_SELECT )
         {
             if (wndPtr->dwStyle & WS_DISABLED)
-                SetTextColor( hDC, GetSysColor32(COLOR_GRAYTEXT) );
+                SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
             DrawText16( hDC, wndPtr->text, textlen, &rtext,
                         DT_SINGLELINE | DT_VCENTER );
         }
@@ -486,7 +486,7 @@
 
     if (!wndPtr->text) return;
     if (wndPtr->dwStyle & WS_DISABLED)
-        SetTextColor( hDC, GetSysColor32(COLOR_GRAYTEXT) );
+        SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
     rc.left += 10;
     DrawText16( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
 }
diff --git a/controls/combo.c b/controls/combo.c
index 72aca44..f8fccf8 100644
--- a/controls/combo.c
+++ b/controls/combo.c
@@ -38,8 +38,8 @@
 #define CBLMM_EDGE   4    /* distance inside box which is same as moving mouse
 			     outside box, to trigger scrolling of CBL */
 
-static BOOL CBCheckSize(HWND16 hwnd);
-static BOOL CBLCheckSize(HWND16 hwnd);
+static BOOL32 CBCheckSize(HWND16 hwnd);
+static BOOL32 CBLCheckSize(HWND16 hwnd);
 
 static HBITMAP16 hComboBit = 0;
 static WORD CBitHeight, CBitWidth;
@@ -81,7 +81,7 @@
   return TRUE;
 }
 
-void ComboUpdateWindow(HWND16 hwnd, LPHEADLIST lphl, LPHEADCOMBO lphc, BOOL repaint)
+void ComboUpdateWindow(HWND16 hwnd, LPHEADLIST lphl, LPHEADCOMBO lphc, BOOL32 repaint)
 {
   WND *wndPtr = WIN_FindWndPtr(hwnd);
 
@@ -628,7 +628,7 @@
 /***********************************************************************
  *             CBCheckSize
  */
-static BOOL CBCheckSize(HWND16 hwnd)
+static BOOL32 CBCheckSize(HWND16 hwnd)
 {
   LPHEADCOMBO  lphc = ComboGetStorageHeader(hwnd);
   LPHEADLIST   lphl = ComboGetListHeader(hwnd);
@@ -711,7 +711,7 @@
                  }
                 break;
     case ID_EDIT:                                      /* update LISTBOX window */
-                 id=GetWindowWord(hwnd,GWW_ID);
+                 id = GetWindowWord32(hwnd,GWW_ID);
                  switch (HIWORD(lParam))
                  {
                   case EN_UPDATE:GetWindowText32A(lphc->hWndEdit,buffer,255);
@@ -786,7 +786,7 @@
 /***********************************************************************
  *           ComboWndProc
  */
-LRESULT ComboBoxWndProc(HWND16 hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
+LRESULT ComboBoxWndProc(HWND16 hwnd, UINT16 message, WPARAM16 wParam, LPARAM lParam)
 {
     switch(message) {	
      case WM_NCCREATE: return CBNCCreate(hwnd, wParam, lParam);
@@ -1165,7 +1165,7 @@
 /***********************************************************************
  *             CBLCheckSize
  */
-static BOOL CBLCheckSize(HWND16 hwnd)
+static BOOL32 CBLCheckSize(HWND16 hwnd)
 {
   LPHEADCOMBO  lphc = ComboGetStorageHeader(hwnd);
   LPHEADLIST   lphl = ComboGetListHeader(hwnd);
@@ -1218,7 +1218,7 @@
 /***********************************************************************
  *           ComboLBoxWndProc
  */
-LRESULT ComboLBoxWndProc(HWND16 hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
+LRESULT ComboLBoxWndProc(HWND16 hwnd, UINT16 message, WPARAM16 wParam, LPARAM lParam)
 {
     switch(message) {	
      case WM_CREATE: return CBLCreate(hwnd, wParam, lParam);
diff --git a/controls/desktop.c b/controls/desktop.c
index db876a8..2466ea7 100644
--- a/controls/desktop.c
+++ b/controls/desktop.c
@@ -4,7 +4,6 @@
  * Copyright 1994 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
@@ -91,8 +90,8 @@
 	 (infoPtr->bitmapSize.cy < rect.bottom))))
     {
 	  /* Set colors in case pattern is a monochrome bitmap */
-	SetBkColor( hdc, RGB(0,0,0) );
-	SetTextColor( hdc, GetSysColor32(COLOR_BACKGROUND) );
+	SetBkColor32( hdc, RGB(0,0,0) );
+	SetTextColor32( hdc, GetSysColor32(COLOR_BACKGROUND) );
 	FillRect32( hdc, &rect, infoPtr->hbrushPattern );
     }
 
@@ -243,7 +242,7 @@
 	int i;
 
 	for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff;
-	hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern );
+	hbitmap = CreateBitmap32( 8, 8, 1, 1, (LPSTR)pattern );
 	infoPtr->hbrushPattern = CreatePatternBrush32( hbitmap );
 	DeleteObject32( hbitmap );
     }
diff --git a/controls/edit.c b/controls/edit.c
index 8e7b59f..3187698 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -13,8 +13,6 @@
  *
  */
 
-
-#define NO_TRANSITION_TYPES	/* This file is Win32-clean */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1778,9 +1776,10 @@
 		return 0;
 	BkColor = GetBkColor32(hdc);
 	TextColor = GetTextColor32(hdc);
-	if (rev) {
-		SetBkColor(hdc, GetSysColor32(COLOR_HIGHLIGHT));
-		SetTextColor(hdc, GetSysColor32(COLOR_HIGHLIGHTTEXT));
+	if (rev)
+        {
+            SetBkColor32(hdc, GetSysColor32(COLOR_HIGHLIGHT));
+            SetTextColor32(hdc, GetSysColor32(COLOR_HIGHLIGHTTEXT));
 	}
 	text = EDIT_GetPasswordPointer(wndPtr);
 	li = (INT32)EDIT_EM_LineIndex(wndPtr, line, 0);
@@ -1788,9 +1787,10 @@
 	ret = (INT32)LOWORD(TabbedTextOut32A(hdc, x, y, text + li + col, count,
 					es->NumTabStops, es->TabStops, -xoff));
 	free(text);
-	if (rev) {
-		SetBkColor(hdc, BkColor);
-		SetTextColor(hdc, TextColor);
+	if (rev)
+        {
+            SetBkColor32(hdc, BkColor);
+            SetTextColor32(hdc, TextColor);
 	}
 	return ret;
 }
@@ -1863,7 +1863,7 @@
 	if (EDIT_GetRedraw(wndPtr)) {
 		if (wndPtr->hwndSelf == GetFocus32()) {
 			pos = EDIT_EM_PosFromChar(wndPtr, ne, 0);
-			SetCaretPos((INT16)LOWORD(pos), (INT16)HIWORD(pos));
+			SetCaretPos16((INT16)LOWORD(pos), (INT16)HIWORD(pos));
 		}
 		ORDER_INT32(s, ns);
 		ORDER_INT32(s, ne);
@@ -2137,9 +2137,9 @@
 		}
 		dprintf_edit(stddeb, "edit: EM_GETHANDLE: local heap initialized\n");
 	}
-	if (!(newBuf = LOCAL_Alloc(wndPtr->hInstance,
-				EDIT_WM_GetTextLength(wndPtr, 0, 0) + 1,
-				LMEM_MOVEABLE))) {
+	if (!(newBuf = LOCAL_Alloc(wndPtr->hInstance, LMEM_MOVEABLE,
+                                   EDIT_WM_GetTextLength(wndPtr, 0, 0) + 1)))
+        {
 		fprintf(stderr, "edit: EM_GETHANDLE: could not allocate new 16 bit buffer\n");
 		return 0;
 	}
@@ -3122,7 +3122,7 @@
 	GlobalUnlock16(hdst);
 	OpenClipboard32(wndPtr->hwndSelf);
 	EmptyClipboard32();
-	SetClipboardData(CF_TEXT, hdst);
+	SetClipboardData16(CF_TEXT, hdst);
 	CloseClipboard32();
 	return -1;
 }
@@ -3530,7 +3530,7 @@
 	INT32 s;
 	INT32 e;
 
-	DestroyCaret();
+	DestroyCaret32();
 	if(!(wndPtr->dwStyle & ES_NOHIDESEL)) {
 		EDIT_EM_GetSel(wndPtr, (WPARAM32)&s, (LPARAM)&e);
 		EDIT_InvalidateText(wndPtr, s, e);
@@ -3688,7 +3688,7 @@
 		oldFont = (HFONT32)SelectObject32(hdc, hFont);
 	EDIT_SEND_CTLCOLOR(wndPtr, hdc);
 	if (!IsWindowEnabled32(wndPtr->hwndSelf))
-		SetTextColor(hdc, GetSysColor32(COLOR_GRAYTEXT));
+		SetTextColor32(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);
@@ -3699,7 +3699,7 @@
 	if (wndPtr->hwndSelf == GetFocus32()) {
 		EDIT_GetSel(wndPtr, NULL, &e);
 		pos = EDIT_EM_PosFromChar(wndPtr, e, 0);
-		SetCaretPos((INT16)LOWORD(pos), (INT16)HIWORD(pos));
+		SetCaretPos16( (INT16)LOWORD(pos), (INT16)HIWORD(pos) );
 	}
 	EndPaint32(wndPtr->hwndSelf, &ps);
 	return 0;
@@ -3717,7 +3717,8 @@
 	LPSTR src;
 
 	OpenClipboard32(wndPtr->hwndSelf);
-	if ((hsrc = GetClipboardData(CF_TEXT))) {
+	if ((hsrc = GetClipboardData16(CF_TEXT)))
+        {
 		src = (LPSTR)GlobalLock16(hsrc);
 		EDIT_EM_ReplaceSel(wndPtr, (WPARAM32)TRUE, (LPARAM)src);
 		GlobalUnlock16(hsrc);
@@ -3753,7 +3754,7 @@
 	INT32 e;
 
 	EDIT_GetSel(wndPtr, &s, &e);
-	CreateCaret(wndPtr->hwndSelf, 0, 2, EDIT_GetLineHeight(wndPtr));
+	CreateCaret32( wndPtr->hwndSelf, 0, 2, EDIT_GetLineHeight(wndPtr) );
 	EDIT_SetSel(wndPtr, s, e);
 	if(!(wndPtr->dwStyle & ES_NOHIDESEL))
 		EDIT_InvalidateText(wndPtr, s, e);
@@ -3791,8 +3792,9 @@
 	if ((BOOL32)lParam && EDIT_GetRedraw(wndPtr))
 		InvalidateRect32( wndPtr->hwndSelf, NULL, TRUE );
 	if (wndPtr->hwndSelf == GetFocus32()) {
-		DestroyCaret();
-		CreateCaret(wndPtr->hwndSelf, 0, 2, EDIT_GetLineHeight(wndPtr));
+		DestroyCaret32();
+		CreateCaret32( wndPtr->hwndSelf, 0,
+                               2, EDIT_GetLineHeight(wndPtr) );
 		EDIT_SetSel(wndPtr, s, e);
 		ShowCaret32(wndPtr->hwndSelf);
 	}
diff --git a/controls/listbox.c b/controls/listbox.c
index db00116..57afcf4 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -4,7 +4,6 @@
  * Copyright 1996 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <string.h>
 #include <stdio.h>
 #include "windows.h"
@@ -470,16 +469,16 @@
         }
         if (item && item->selected)
         {
-            SetBkColor( hdc, GetSysColor32( COLOR_HIGHLIGHT ) );
-            SetTextColor( hdc, GetSysColor32( COLOR_HIGHLIGHTTEXT ) );
+            SetBkColor32( hdc, GetSysColor32( COLOR_HIGHLIGHT ) );
+            SetTextColor32( hdc, GetSysColor32( COLOR_HIGHLIGHTTEXT ) );
         }
         else
         {
-            SetBkColor( hdc, GetSysColor32( COLOR_WINDOW ) );
+            SetBkColor32( hdc, GetSysColor32( COLOR_WINDOW ) );
             if (wnd->dwStyle & WS_DISABLED)
-                SetTextColor( hdc, GetSysColor32( COLOR_GRAYTEXT ) );
+                SetTextColor32( hdc, GetSysColor32( COLOR_GRAYTEXT ) );
             else
-                SetTextColor( hdc, GetSysColor32( COLOR_WINDOWTEXT ) );
+                SetTextColor32( hdc, GetSysColor32( COLOR_WINDOWTEXT ) );
         }
         dprintf_listbox( stddeb, "Listbox %04x: painting %d (%s) action=%02x "
                          "rect=%d,%d-%d,%d\n",
@@ -856,7 +855,7 @@
             if (!IS_OWNERDRAW(descr))
             {
                 /* Clear the bottom of the column */
-                SetBkColor( hdc, GetSysColor32( COLOR_WINDOW ) );
+                SetBkColor32( hdc, GetSysColor32( COLOR_WINDOW ) );
                 if (rect.top < descr->height)
                 {
                     rect.bottom = descr->height;
@@ -881,7 +880,7 @@
     if (!IS_OWNERDRAW(descr))
     {
         /* Clear the remainder of the client area */
-        SetBkColor( hdc, GetSysColor32( COLOR_WINDOW ) );
+        SetBkColor32( hdc, GetSysColor32( COLOR_WINDOW ) );
         if (rect.top < descr->height)
         {
             rect.bottom = descr->height;
diff --git a/controls/menu.c b/controls/menu.c
index 6f0c071..29d073c 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -11,7 +11,6 @@
  * This is probably not the meaning this style has in MS-Windows.
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <ctype.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -600,18 +599,18 @@
     if (lpitem->item_flags & MF_HILITE)
     {
 	if (lpitem->item_flags & MF_GRAYED)
-	    SetTextColor( hdc, GetSysColor32( COLOR_GRAYTEXT ) );
+	    SetTextColor32( hdc, GetSysColor32( COLOR_GRAYTEXT ) );
 	else
-	    SetTextColor( hdc, GetSysColor32( COLOR_HIGHLIGHTTEXT ) );
-	SetBkColor( hdc, GetSysColor32( COLOR_HIGHLIGHT ) );
+	    SetTextColor32( hdc, GetSysColor32( COLOR_HIGHLIGHTTEXT ) );
+	SetBkColor32( hdc, GetSysColor32( COLOR_HIGHLIGHT ) );
     }
     else
     {
 	if (lpitem->item_flags & MF_GRAYED)
-	    SetTextColor( hdc, GetSysColor32( COLOR_GRAYTEXT ) );
+	    SetTextColor32( hdc, GetSysColor32( COLOR_GRAYTEXT ) );
 	else
-	    SetTextColor( hdc, GetSysColor32( COLOR_MENUTEXT ) );
-	SetBkColor( hdc, GetSysColor32( COLOR_MENU ) );
+	    SetTextColor32( hdc, GetSysColor32( COLOR_MENUTEXT ) );
+	SetBkColor32( hdc, GetSysColor32( COLOR_MENU ) );
     }
 
     if (!menuBar)
@@ -869,8 +868,8 @@
       /* Display the window */
 
     SetWindowPos32( menu->hWnd, HWND_TOP, 0, 0, 0, 0,
-		    SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE );
-    UpdateWindow( menu->hWnd );
+		    SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+    UpdateWindow32( menu->hWnd );
     return TRUE;
 }
 
@@ -1310,8 +1309,8 @@
     {
 	if (!(item->item_flags & (MF_GRAYED | MF_DISABLED)))
 	{
-	    PostMessage( hwndOwner, (menu->wFlags & MF_SYSMENU) ? 
-			WM_SYSCOMMAND : WM_COMMAND, item->item_id, 0 );
+	    PostMessage16( hwndOwner, (menu->wFlags & MF_SYSMENU) ? 
+                           WM_SYSCOMMAND : WM_COMMAND, item->item_id, 0 );
 	    return FALSE;
 	}
 	else return TRUE;
@@ -1473,7 +1472,7 @@
                                         ? GetSystemMenu32( *hwndOwner, 0) 
                                         : *hmenu));
 
-    if( l == 0 || !IsMenu32(LOWORD(l)) || !IsWindow(HIWORD(l)) ) return 0;
+    if( l == 0 || !IsMenu32(LOWORD(l)) || !IsWindow32(HIWORD(l)) ) return 0;
 
     /* shutdown current menu -
      * all these checks for system popup window are needed
@@ -1938,7 +1937,7 @@
 		if( uItem == NO_SELECTED_ITEM )
 		    MENU_SelectItemRel( wndPtr->hwndSelf, hTrackMenu, ITEM_NEXT );
 		else
-		    PostMessage( wndPtr->hwndSelf, WM_KEYDOWN, VK_DOWN, 0L );
+		    PostMessage16( wndPtr->hwndSelf, WM_KEYDOWN, VK_DOWN, 0L );
 
 		MENU_TrackMenu( hTrackMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
 				0, 0, wndPtr->hwndSelf, NULL );
diff --git a/controls/oldlbox.c b/controls/oldlbox.c
index 87e6a5a..cbecfd9 100644
--- a/controls/oldlbox.c
+++ b/controls/oldlbox.c
@@ -66,7 +66,7 @@
   SetWindowLong32A(hwnd, 0, (LONG)lphl);
   ListBoxInitialize(lphl);
   lphl->DrawCtlType    = CtlType;
-  lphl->CtlID          = GetWindowWord(hwnd,GWW_ID);
+  lphl->CtlID          = GetWindowWord16(hwnd,GWW_ID);
   lphl->bRedrawFlag    = TRUE;
   lphl->iNumStops      = 0;
   lphl->TabStops       = NULL;
@@ -160,10 +160,10 @@
 }
 
 
-LPLISTSTRUCT ListBoxGetItem(LPHEADLIST lphl, UINT uIndex)
+LPLISTSTRUCT ListBoxGetItem(LPHEADLIST lphl, UINT16 uIndex)
 {
   LPLISTSTRUCT lpls;
-  UINT         Count = 0;
+  UINT16         Count = 0;
 
   if (uIndex >= lphl->ItemsCount) return NULL;
 
@@ -199,7 +199,7 @@
       OldBkMode = SetBkMode32(hdc, TRANSPARENT);
 
       if (itemState != 0) {
-	dwOldTextColor = SetTextColor(hdc, 0x00FFFFFFL);
+	dwOldTextColor = SetTextColor32(hdc, 0x00FFFFFFL);
 	FillRect16(hdc, rect, GetStockObject32(BLACK_BRUSH));
       }
 
@@ -213,7 +213,7 @@
       }
 
       if (itemState != 0) {
-	SetTextColor(hdc, dwOldTextColor);
+	SetTextColor32(hdc, dwOldTextColor);
       }
       
       SetBkMode32(hdc, OldBkMode);
@@ -303,7 +303,7 @@
   return lplsnew;
 }
 
-static int ListBoxAskCompare(LPHEADLIST lphl, int startItem, SEGPTR matchData, BOOL exactMatch )
+static int ListBoxAskCompare(LPHEADLIST lphl, int startItem, SEGPTR matchData, BOOL32 exactMatch )
 {
  /*  Do binary search for sorted listboxes. Linked list item storage sort of 
   *  defeats the purpose ( forces to traverse item list all the time ) but M$ does it this way...
@@ -401,18 +401,18 @@
  return (exactMatch)? LB_ERR: pos;
 }
 
-int ListBoxInsertString(LPHEADLIST lphl, UINT uIndex, LPCSTR newstr)
+int ListBoxInsertString(LPHEADLIST lphl, UINT16 uIndex, LPCSTR newstr)
 {
   LPLISTSTRUCT *lppls, lplsnew, lpls;
   HANDLE16 hStr;
   LPSTR	str;
-  UINT	Count;
+  UINT16	Count;
     
   dprintf_listbox(stddeb,"ListBoxInsertString(%d, %p);\n", uIndex, newstr);
     
   if (!newstr) return -1;
 
-  if (uIndex == (UINT)-1)
+  if (uIndex == (UINT16)-1)
     uIndex = lphl->ItemsCount;
 
   lppls = &lphl->lpFirst;
@@ -466,7 +466,7 @@
 
 int ListBoxAddString(LPHEADLIST lphl, SEGPTR itemData)
 {
-    UINT 	pos = (UINT) -1;
+    UINT16 	pos = (UINT16) -1;
     LPCSTR	newstr = (lphl->HasStrings)?(LPCSTR)PTR_SEG_TO_LIN(itemData):(LPCSTR)itemData;
 
     if ( lphl->dwStyle & LBS_SORT ) 
@@ -476,7 +476,7 @@
 }
 
 
-int ListBoxGetText(LPHEADLIST lphl, UINT uIndex, LPSTR OutStr)
+int ListBoxGetText(LPHEADLIST lphl, UINT16 uIndex, LPSTR OutStr)
 {
   LPLISTSTRUCT lpls;
 
@@ -498,7 +498,7 @@
 }
 
 
-DWORD ListBoxGetItemData(LPHEADLIST lphl, UINT uIndex)
+DWORD ListBoxGetItemData(LPHEADLIST lphl, UINT16 uIndex)
 {
   LPLISTSTRUCT lpls;
 
@@ -508,7 +508,7 @@
 }
 
 
-int ListBoxSetItemData(LPHEADLIST lphl, UINT uIndex, DWORD ItemData)
+int ListBoxSetItemData(LPHEADLIST lphl, UINT16 uIndex, DWORD ItemData)
 {
   LPLISTSTRUCT lpls = ListBoxGetItem(lphl, uIndex);
 
@@ -518,10 +518,10 @@
 }
 
 
-int ListBoxDeleteString(LPHEADLIST lphl, UINT uIndex)
+int ListBoxDeleteString(LPHEADLIST lphl, UINT16 uIndex)
 {
   LPLISTSTRUCT lpls, lpls2;
-  UINT	Count;
+  UINT16	Count;
 
   if (uIndex >= lphl->ItemsCount) return LB_ERR;
 
@@ -561,13 +561,13 @@
   return lphl->ItemsCount;
 }
 
-static int lbFindString(LPHEADLIST lphl, UINT nFirst, SEGPTR MatchStr, BOOL match)
+static int lbFindString(LPHEADLIST lphl, UINT16 nFirst, SEGPTR MatchStr, BOOL32 match)
 {
   /*  match is either MATCH_SUBSTR or MATCH_EXACT */
 
   LPLISTSTRUCT lpls;
-  UINT	       Count;
-  UINT         First      = nFirst + 1;
+  UINT16	       Count;
+  UINT16         First      = nFirst + 1;
   int	       s_length   = 0;
   LPSTR        lpMatchStr = (LPSTR)MatchStr;
 
@@ -624,12 +624,12 @@
   return LB_ERR;
 }
 
-int ListBoxFindString(LPHEADLIST lphl, UINT nFirst, SEGPTR MatchStr)
+int ListBoxFindString(LPHEADLIST lphl, UINT16 nFirst, SEGPTR MatchStr)
 {
   return lbFindString(lphl, nFirst, MatchStr, MATCH_SUBSTR );
 }
 
-int ListBoxFindStringExact(LPHEADLIST lphl, UINT nFirst, SEGPTR MatchStr)
+int ListBoxFindStringExact(LPHEADLIST lphl, UINT16 nFirst, SEGPTR MatchStr)
 {
   return lbFindString(lphl, nFirst, MatchStr, MATCH_EXACT );
 }
@@ -676,7 +676,7 @@
     lpls->itemState = 0;
   }
 
-  if ((wIndex != (UINT)-1) && (wIndex < lphl->ItemsCount))
+  if ((wIndex != (UINT16)-1) && (wIndex < lphl->ItemsCount))
   {
     lphl->ItemFocused = wIndex;
     lpls = ListBoxGetItem(lphl, wIndex);
@@ -693,7 +693,7 @@
 
 /* ------------------------- dir listing ------------------------ */
 
-LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec)
+LONG ListBoxDirectory(LPHEADLIST lphl, UINT16 attrib, LPCSTR filespec)
 {
     return 0;
 }
@@ -745,7 +745,7 @@
 int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar)
 {
   LPLISTSTRUCT lpls;
-  UINT	       count,first;
+  UINT16 count,first;
 
   if ((char)wChar < ' ') return LB_ERR;
   if (!lphl->HasStrings) return LB_ERR;
diff --git a/controls/scroll.c b/controls/scroll.c
index 14c3f40..819ff5d 100644
--- a/controls/scroll.c
+++ b/controls/scroll.c
@@ -5,7 +5,6 @@
  * Copyright 1994, 1996 Alexandre Julliard
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
diff --git a/controls/static.c b/controls/static.c
index 9842f06..77e6c55 100644
--- a/controls/static.c
+++ b/controls/static.c
@@ -67,7 +67,8 @@
 /***********************************************************************
  *           StaticWndProc
  */
-LRESULT StaticWndProc( HWND16 hWnd, UINT uMsg, WPARAM16 wParam, LPARAM lParam)
+LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
+                       LPARAM lParam )
 {
     LRESULT lResult = 0;
     WND *wndPtr = WIN_FindWndPtr(hWnd);
@@ -140,7 +141,7 @@
             else
                 DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
 	    InvalidateRect32( hWnd, NULL, FALSE );
-	    UpdateWindow( hWnd );
+	    UpdateWindow32( hWnd );
 	    break;
 
         case WM_SETFONT:
@@ -149,7 +150,7 @@
             if (LOWORD(lParam))
             {
                 InvalidateRect32( hWnd, NULL, FALSE );
-                UpdateWindow( hWnd );
+                UpdateWindow32( hWnd );
             }
             break;
 
@@ -168,7 +169,7 @@
 	case STM_SETICON:
             lResult = STATIC_SetIcon( wndPtr, (HICON16)wParam );
             InvalidateRect32( hWnd, NULL, FALSE );
-            UpdateWindow( hWnd );
+            UpdateWindow32( hWnd );
 	    break;
 
 	default:
diff --git a/controls/status.c b/controls/status.c
index 17c4372..feef96c 100644
--- a/controls/status.c
+++ b/controls/status.c
@@ -4,7 +4,6 @@
  * Copyright 1996 Bruce Milner
  */
 
-#define NO_TRANSITION_TYPES  /* This file is Win32-clean */
 #include <stdio.h>
 #include <stdlib.h>
 #include "windows.h"
diff --git a/controls/widgets.c b/controls/widgets.c
index 0d5e219..ffc2a23 100644
--- a/controls/widgets.c
+++ b/controls/widgets.c
@@ -94,7 +94,7 @@
  * 
  * Initialize the built-in window classes.
  */
-BOOL WIDGETS_Init(void)
+BOOL32 WIDGETS_Init(void)
 {
     int i;
     char *name;