Release 960331

Sun Mar 31 13:54:46 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [tools/build.c]
	Changed BuildSpec32Files() to generate assembly instead of C code.
	Unified -spec16 and -spec32 options; DLL type is now determined by
	the 'type' declaration in the .spec file.
	New -stdcall option to build all stdcall assembly relays.

	* [if1632/relay.c] [if1632/relay32.c] [include/dlls.h]
	Started to unify 16- and 32-bit builtin DLLs.

	* [loader/module.c]
	Added MODULE_GetWndProcEntry32() to mirror MODULE_GetWndProcEntry16().

	* [loader/pe_image.c] [loader/resource.c]
	All modules now have a NE signature, and can be distinguished by
	the NE_FFLAGS_WIN32 flag.

	* [windows/alias.c]
	Aliases for built-in window procedures are now all created at
	startup in ALIAS_Init().

Fri Mar 29 14:56:39 1996  Greg Kreider <kreider@natlab.research.philips.com>

	* [controls/combo.c]
	Limit rectangle to clear to size of item when painting combo, not
 	default.  Only draw items in list when there is enough room for them.

	* [controls/listbox.c]
	Get the measure of every item that's added and store in the item's
 	data structure.  Scroll listbox if mouse near edge of box.  Only
 	draw items in list when there is enough room.

Fri Mar 29 12:00:00 1996  Alex Korobka <alex@phm30.pharm.sunysb.edu>

	* [windows/defwnd.c] [windows/dialog.c] [windows/mdi.c]
	  [windows/nonclient.c] [controls/menu.c] 
	Various changes for better keyboard handling. 

	* [windows/event.c] [windows/message.c] [misc/keyboard.c]
	Proper keyboard message ordering, working GetKeyState() (finally!), 
	improvements in ToAscii().

	* [windows/win.c] [windows/message.c]
	Small improvements in WIN_FindWinToRepaint.

	* [windows/win.c] [windows/painting.c] [windows/nonclient.c]
	Put update region in WM_NCPAINT wParam.

	* [loader/task.c]
	Kill task timers when task is deleted, switch timers to the
	new queue in SetTaskQueue().

	* [loader/signal.c] [miscemu/dosmem.c]
	Added SIGALRM signal handler to increment BIOS clock. 

	* [windows/win.c] [windows/winpos.c] [windows/mdi.c]
	Fixed ChildWindowFromPoint(), WM_PARENTNOTIFY and its handling by
	MDI client.

	* [windows/winpos.c]
	Improvements in handling of owned popups. "Floating" toolboxes 
	work better now. 

Thu Mar 28 12:38:29 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [misc/registry.c]
	New file, registry rewrite including win32 extensions
	- Unicode
	- multiple valus per key
	- different datatypes for values
	- multiple rootkeys
	- saving and loading in different registries.

	* [include/winreg.h]
	New file, definitions and structs for registry.

	* [include/winerror.h]
	Some new error defines added... there are more, someone please
 	check a (real-)windows winerror.h.
	
	* [if1632/shell.spec] [if1632/advapi32.spec] [if1632/kernel.spec]
	Registry specs added.

	* [if1632/relay.c]
	Switch internal SHELL.DLL to default 'used'.

	* [win32/string32.c] [include/string32.h]
	Some new functions added.
	char should be unsigned char when converting to 16bit ints.

	* [misc/shell.c] [include/shell.h] [win32/advapi.c]
	Removed old registry functions.

Tue Mar 26 15:01:46 1996  Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>

	* [include/bitmaps/ocr_ibeam]
	Fixed the position of the hotspot.

	* [objects/text.c]
	Fixed a few bugs in TEXT_TabbedTextOut().

	* [windows/event.c]
	Fixed the order of the bits in the KeyStateTable.
	0x80 is the up/down-bit.  0x01 is the toggle bit.

	* [loader/resource.c] [windows/mdi.c] [controls/edit.c]
	Fixed the calls to GetKeyState().

Tue Mar 26 08:43:15 1996  Robert Pouliot <krynos@qbc.clic.net>

	* [resources/sysres_Fr.rc] [resources/TODO]
	Updated FIND_TEXT and REPLACE_TEXT to work like the English version.

Mon Mar 25 17:38:59 1996  Tristan Tarrant <tst@dcs.ed.ac.uk>

	* [resources/sysres_it.rc]
	Added support for Italian [It] language.
diff --git a/programs/progman/dialog.c b/programs/progman/dialog.c
index c19ca83..f35d425 100644
--- a/programs/progman/dialog.c
+++ b/programs/progman/dialog.c
@@ -8,7 +8,8 @@
 #include <commdlg.h>
 #include "progman.h"
 
-static BOOL DIALOG_Browse(HWND, LPCSTR, LPSTR, INT);
+static BOOL    DIALOG_BrowsePrograms(HWND, LPSTR, INT);
+static BOOL    DIALOG_BrowseSymbols(HWND, LPSTR, INT);
 static LRESULT DIALOG_NEW_DlgProc(HWND, UINT, WPARAM, LPARAM);
 static LRESULT DIALOG_COPY_MOVE_DlgProc(HWND, UINT, WPARAM, LPARAM);
 static LRESULT DIALOG_GROUP_DlgProc(HWND, UINT, WPARAM, LPARAM);
@@ -157,13 +158,10 @@
  *           DIALOG_Delete
  */
 
-BOOL DIALOG_Delete(LPCSTR lpszFormat_s, LPCSTR lpszName)
+BOOL DIALOG_Delete(UINT ids_text_s, LPCSTR lpszName)
 {
-  CHAR msg[1000];
-  if (sizeof(msg) <= lstrlen(lpszFormat_s) + lstrlen(lpszName)) return FALSE;
-  wsprintf(msg, (LPSTR)lpszFormat_s, lpszName);
-  return (IDYES == MessageBox(Globals.hMainWnd, msg, STRING_DELETE,
-			      MB_YESNO | MB_DEFBUTTON2));
+  return (IDYES == MAIN_MessageBoxIDS_s(ids_text_s, lpszName, IDS_DELETE,
+					MB_YESNO | MB_DEFBUTTON2));
 }
 
 
@@ -284,6 +282,7 @@
 
 static LRESULT DIALOG_PROGRAM_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
+  CHAR buffer[MAX_STRING_LEN];
   switch (msg)
     {
     case WM_INITDIALOG:
@@ -291,7 +290,10 @@
       SetDlgItemText(hDlg, PM_COMMAND_LINE, ProgramAttributes.lpszCmdLine);
       SetDlgItemText(hDlg, PM_DIRECTORY, ProgramAttributes.lpszWorkDir);
       if (!*ProgramAttributes.lpnHotKey)
-	SetDlgItemText(hDlg, PM_HOT_KEY, (LPSTR)STRING_NO_HOT_KEY);
+	{
+	  LoadString(Globals.hInstance, IDS_NO_HOT_KEY, buffer, sizeof(buffer));
+	  SetDlgItemText(hDlg, PM_HOT_KEY, buffer);
+	}
 
       CheckDlgButton(hDlg, PM_SYMBOL,
 		     (*ProgramAttributes.lpnCmdShow == SW_SHOWMINIMIZED));
@@ -309,8 +311,7 @@
 	case PM_BROWSE:
 	  {
 	    CHAR filename[MAX_PATHNAME_LEN];
-	    if (DIALOG_Browse(hDlg, STRING_BROWSE_EXE_FILTER,
-			      filename, sizeof(filename)))
+	    if (DIALOG_BrowsePrograms(hDlg, filename, sizeof(filename)))
 	      SetDlgItemText(hDlg, PM_COMMAND_LINE, filename);
 	    return TRUE;
 	  }
@@ -432,14 +433,13 @@
 	case PM_BROWSE:
 	  {
 	    CHAR filename[MAX_PATHNAME_LEN];
-	    if (DIALOG_Browse(hDlg, STRING_BROWSE_ICO_FILTER,
-			      filename, sizeof(filename)))
+	    if (DIALOG_BrowseSymbols(hDlg, filename, sizeof(filename)))
 	      SetDlgItemText(hDlg, PM_ICON_FILE, filename);
 	    return TRUE;
 	  }
 
 	case PM_HELP:
-	  MAIN_NotImplementedError();
+	  MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK);
 	  return TRUE;
 
 	case IDOK:
@@ -500,14 +500,13 @@
 	case PM_BROWSE:
 	  {
 	    CHAR filename[MAX_PATHNAME_LEN];
-	    if (DIALOG_Browse(hDlg, STRING_BROWSE_EXE_FILTER,
-			      filename, sizeof(filename)))
+	    if (DIALOG_BrowsePrograms(hDlg, filename, sizeof(filename)))
 	      SetDlgItemText(hDlg, PM_COMMAND, filename);
 	    return TRUE;
 	  }
 
 	case PM_HELP:
-	  MAIN_NotImplementedError();
+	  MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK);
 	  return TRUE;
 
 	case IDOK:
@@ -536,15 +535,16 @@
  *           DIALOG_Browse
  */
 
-/* FIXME is this correct ? */
-static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpcstrFilter,
+static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter,
 			  LPSTR lpstrFile, INT nMaxFile)
 {
   OPENFILENAME openfilename;
+
+  /* FIXME is this correct ? */
   openfilename.lStructSize       = 0;
   openfilename.hwndOwner         = hDlg;
   openfilename.hInstance         = Globals.hInstance;
-  openfilename.lpstrFilter       = (LPSTR)lpcstrFilter;
+  openfilename.lpstrFilter       = (LPSTR)lpszzFilter;
   openfilename.lpstrCustomFilter = 0;
   openfilename.nMaxCustFilter    = 0;
   openfilename.nFilterIndex      = 0;
@@ -564,6 +564,55 @@
   return GetOpenFileName(&openfilename);
 }
 
+/***********************************************************************
+ *
+ *           DIALOG_AddFilterItem
+ */
+
+static VOID DIALOG_AddFilterItem(LPSTR *p, UINT ids, LPCSTR filter)
+{
+  LoadString(Globals.hInstance, ids, *p, MAX_STRING_LEN);
+  *p += strlen(*p) + 1;
+  lstrcpy(*p, (SEGPTR) filter);
+  *p += strlen(*p) + 1;
+  **p = '\0';
+}
+
+/***********************************************************************
+ *
+ *           DIALOG_BrowsePrograms
+ */
+
+static BOOL DIALOG_BrowsePrograms(HWND hDlg, LPSTR lpszFile, INT nMaxFile)
+{
+  CHAR  szzFilter[2 * MAX_STRING_LEN + 100];
+  LPSTR p = szzFilter;
+
+  DIALOG_AddFilterItem(&p, IDS_PROGRAMS,  "*.exe;*.pif;*.com;*.bat");
+  DIALOG_AddFilterItem(&p, IDS_ALL_FILES, "*.*");
+
+  return(DIALOG_Browse(hDlg, szzFilter, lpszFile, nMaxFile));
+}
+
+/***********************************************************************
+ *
+ *           DIALOG_BrowseSymbols
+ */
+
+static BOOL DIALOG_BrowseSymbols(HWND hDlg, LPSTR lpszFile, INT nMaxFile)
+{
+  CHAR  szzFilter[5 * MAX_STRING_LEN + 100];
+  LPSTR p = szzFilter;
+
+  DIALOG_AddFilterItem(&p, IDS_SYMBOL_FILES,  "*.ico;*.exe;*.dll");
+  DIALOG_AddFilterItem(&p, IDS_PROGRAMS,      "*.exe");
+  DIALOG_AddFilterItem(&p, IDS_LIBRARIES_DLL, "*.dll");
+  DIALOG_AddFilterItem(&p, IDS_SYMBOLS_ICO,   "*.ico");
+  DIALOG_AddFilterItem(&p, IDS_ALL_FILES,     "*.*");
+
+  return(DIALOG_Browse(hDlg, szzFilter, lpszFile, nMaxFile));
+}
+
 /* Local Variables:    */
 /* c-file-style: "GNU" */
 /* End:                */