Sweden-Number/library
Alexandre Julliard 23946ad264 Release 970616
Sat Jun 14 13:05:23 1997  Andreas Mohr <100.30936@germany.net>

	* [include/mmsystem.h]
	Avoided infinite loop in audio code when accessing
 	WAVEOUTCAPS/WAVEINCAPS/MIDIOUTCAPS/AUXCAPS with rigid variable
 	offsets (I applied WINE_PACKED).

	* [*/*]
	Added "WARNING:" and "ERROR:" to some printf's.
	Just grep for them with '-debugmsg +all'.

	* [multimedia/audio.c] [multimedia/mmsystem.c]
	Implemented wave callbacks: window and function callback.
	Fixed problem with WAVE_NotifyClient().
	Misc fixes.

	* [windows/winhelp.c]
	Fixed problem with windows help telling "Help topic doesn't exist".
	But this problem still remains when using Winword.

Wed Jun 11 09:14:20 1997  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [wine.ini]
	New 'fonts' section format. Read documentation/fonts.

	* [controls/icontitle.c] [windows/winpos.c] [windows/nonclient.c]
	  [windows/win.c] [include/win.h]
	Implemented icon titles.

	* [graphics/x11drv/xfont.c] [objects/font.c] [objects/dc.c]
	  [include/x11drv.h] [include/x11font.h] [documentation/fonts]
	Rewrote font mapper from scratch.

	* [tools/fnt2bdf.c]
	Bug fixes. REPLACE FONTS CREATED BY THE PREVIOUS VERSIONS.

	* [windows/defwnd.c] [windows/nonclient.c]
	Word document window activation fix.

	* [windows/mdi.c] [windows/win.c]
	Replaced WCL lists with WIN_BuildWinArray().

Mon Jun  9 23:51:16 1997  Andrew Taylor <andrew@riscan.com>

	* [misc/error.c] [include/windows.h] [if1632/kernel.spec]
	Implemented LogParamError, LogError functions.

Tue Jun  3 23:46:04 1997  Michiel van Loon <mfvl@xs4all.nl>

	* [include/mmsystem.h] [multimedia/audio.c]
	Constants for asynchronous play and record.

	* [multimedia/time.c]
	Filled in some empty functions.

	* [multimedia/mmsystem.c]
	Fixed bugs in waveOutOpen.

	* [multimedia/mmsystem.c] [multimedia/audio.c]
	Implemented Window Callback for wave output at least.

	* [files/file.c]
	Corrected bug in FileDosSetError.
	NULL pointer checking added.

	* [misc/spy.c]
	Added Multimedia messages to SPY_GetMsgName.

Tue Jun 3 22:34:30 1997  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [debugger/*.c][include/peexe.h][loader/*.c][tools/build.c]
	  [tools/fnt2bdf.c][library/sup.c]
	IMAGE_* structs/defines changed fit better to SDK naming
	Don't load non-i386 PE executables.
	%fs should already be initialised for the FIRST loaded PE module.

	* [if1632/advapi.spec][win32/advapi.c]
	Some small stubs added to bring win32 setup.exe a bit farther.

	* [if1632/kernel32.spec][scheduler/process.c]
	Adapted to match win95 kernel32.dll ordinals (NT doesn't use
 	ordinal import), some ordinal only exported functions added.

	* [if1632/relay.c]
	Added CallProc32W.

	* [misc/lzexpand.c]
	Fixed return values of GetExpandedName* (thanks to Andreas Mohr).

	* [objects/dib.c]
	Everything with more than 8 bit of color is a truecolor mode
	and doesn't have a colormap.

Tue Jun  3 09:24:53 1997  John Harvey <john@division.co.uk>

	* [graphics/win16drv/font.c] [graphics/win16drv/init.c]
	  [graphics/win16drv/prtdrv.c] [graphics/win16drv/text.c]
	  [include/win16drv.h]
	Changed some structures that are passed to and from the 16 bit
 	drivers to be allocated on the global heap.
	Implemented Escape(Control) 0x100 GetExtTextData properly to
	stop word from crashing.
	Postscript driver now prints on complete page instead of top
	left corner.
	Print spooling implemented.

	* [loader/module.c]
	MODULE_GetOrdinal changed char buffer to unsigned char to stop
	a loop that was happening when running the font control
	program from the control panel.

Sun Jun  1 19:05:02 1997  Peter Schlaile <up9n@rz.uni-karlsruhe.de>

	* [include/miscemu.h] [loader/main.c] [msdos/ioports.c]
	Added support for direct io port access.

Fri May 30 16:18:35 1997  David A. Cuthbert <dacut@dssc3353.ece.cmu.edu>

	* [misc/ver.c]
	Implemented VerFindFile16.

Tue May 27 22:00:39 1997  Rick Richardson <rick@dgii.com>

	* [misc/comm.c]
	Fixed GetCommError and GetCommEventMask.

Tue May 27  9:10:53 1997  Georg Beyerle <gbeyerle@awi-potsdam.de>

	* [scheduler/thread.c]
	Minor fix in thread database initialization.

Mon May 26 19:46:34 1997  Philippe De Muyter  <phdm@info.ucl.ac.be>

	* [objects/dc.c]
	In DC_SetupGCForPen, avoid to draw in GXxor mode with a 0 mask.

Mon May 26 15:22:42 1997  Bruce Milner <Bruce.Milner@genetics.utah.edu>

	* [loader/pe_image.c]
	Add code for modules that co-reference each other. Photodex's
	agds.exe (cpic32) has two dll's that make calls into each other.

Mon May 26 13:38:16 1997  Jody Goldberg <jodyg@idt.net>

	* [memory/virtual.c]
	Dont use stdio when reading /proc/self/maps.  It causes problems
	with libc6.

	* [windows/dialog.c]
	Translate messages in IsDialogMessage when DLGC_WANTMESSAGE
	is used.

Sun May 25 17:02:21 1997  Huw D M Davies <h.davies1@physics.oxford.ac.uk>

	* [objects/metafile.c]
	Resource cleanup in EnumMetaFile(). This was one reason Word was
	crashing after long periods of use. (Thanks to Chris Underhill for
	the logs)

Sun May 25 14:59:33 1997  Jimen Ching  <jching@flex.com>

	* [multimedia/mcistring.c]
	Initial support for compound MCI commands.
	Use case-insensitive compare for 'alias' and 'element' keywords.
	Fixed pointer copy of args keywords array.
1997-06-16 17:43:53 +00:00
..
Makefile.in Release 961208 1996-12-08 19:25:27 +00:00
README.resources Release 951226 1995-12-26 15:05:24 +00:00
arch.c Release 951226 1995-12-26 15:05:24 +00:00
libres.c Release 970305 1997-03-05 08:22:35 +00:00
miscstubs.c Release 970509 1997-05-09 08:40:27 +00:00
sup.c Release 970616 1997-06-16 17:43:53 +00:00
winestub.c Release 970101 1997-01-01 17:29:55 +00:00

README.resources

This is a short discussion of resources in WineLib.

Introduction
Resources are used to store dialogs, menus, bitmaps, icons, 
version information, strings, fonts, and accelerators.
In a Win3.1 programming environment, there are three file formats for 
resources:
- the RC script, which is human-readable and can be processed by a resource
compiler
- the .RES file, which is the output of the resource compiler
- the .EXE and .DLL files, which store resources as a part of the NE
file format
For WineLib, only a part of this is supported. In particular, there is no
.RES file, the executable is not a NE file (as it is a native Unix executable),
and some resource types are not implemented: icons, version information,
strings, and fonts.

Building a WineLib application
The build process assumes that the C source files and the resource script
is available. At the moment, a single resource script is recommended.
This script is processed by winerc:
1) the preprocessor is used to resolve symbolic style name (LBS_STANDARD, ...)
into numbers. This involves processing windows.h
2) the unused parts of windows.h (type definitions) are removed. This would
not be necessary if Wine's windows.h would use the RC_INVOKED macro.
3) winerc is invoked to create a binary representation of the resources.
This representation is stored as C source code (arrays).
4) gcc is used to compile the generated C code.
Now, each resource is available as a C array to the application. As the 
executable is not in the NE format, it is not possible to retrieve resource
locations in the executable via name. Instead, the resources have to be
referenced with their generated C array names. The linker then resolves
these names in the compiled resource file.
5) The program sources are compiled and linked with the output of step 4.
A sample build process is in toolkit/Makefile:hello3.

Required changes to the program sources
Because loading the resources from an instance handle is not possible,
the *Indirect functions have to be used to load a resource. The C arrays
can be directly passed to the *Indirect functions. So, instead of writing

	hMenu=LoadMenu(hInstance,"MAIN");

write

	hMenu=LoadMenuIndirect(hello3_MENU_MAIN.bytes);

Fortunately, the Windows API has the following functions available:
DialogBoxIndirect
CreateDialogIndirect
DialogBoxIndirectParam
CreateDialogIndirectParam

LoadMenuIndirect
SetDIBitsToDevice

Sample code is available in hello3.c. hello3res.c contains the corresponding
resources.

Keeping a common source
Clearly, changing the sources is not very desirable, and suggestions how
to reduce the amount of work are welcome. In the meantime, two approaches
allow at least to remain a common source between the Win3.1 code and the
WineLib code:
1) conditional compiles:
When compiling a WineLib application, WINELIB is defined. This can be used
to select Wine-specific code.
2) usage of winerc for Windows: The *Indirect functions are available on
plain Win3.1, and the resource format is fully compatible. Thus, recompiling
sources modified for WineLib on Win3.1 is possible and known to work.

Open problems
1) Icons and cursors: For these resources, there is no *Indirect function
documented. In addition, both are implemented by a set of two resources.
This is the reason why they are not supported by winerc.
2) Accelerators: Although winerc supports accelerators, there is no 
LoadAcceleratorIndirect function. A work-around would be to define one.
3) Fonts: Font resources are not supported by Wine at all.
4) String tables: Although string tables are not supported by winerc, there
is no reason not to add such support. Again, some indirect loading would
be necessary.
5) API requires loading by name: At some places, the name of a resource
is passed instead of a handle. The WNDCLASS structure contains the name
of a menu resource, and the icon in a dialog box is referenced by its name.
(Are there some more places?)
Clearly, loading the resource by name would be highly desirable. The
resource compiler currently creates a structure containing all resources
defined in an RC file. However, it is not clear how WINELIB could find the
location of this structure, especially, when there is more than one RC file.