1998-03-15 21:29:56 +01:00
|
|
|
/*
|
1999-05-02 11:23:51 +02:00
|
|
|
* Enhanced metafile functions
|
|
|
|
* Copyright 1998 Douglas Ridgway
|
|
|
|
* 1999 Huw D M Davies
|
1999-12-04 04:56:53 +01:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* The enhanced format consists of the following elements:
|
|
|
|
*
|
|
|
|
* A header
|
|
|
|
* A table of handles to GDI objects
|
|
|
|
* An array of metafile records
|
1999-12-12 00:18:10 +01:00
|
|
|
* A private palette
|
1999-12-04 04:56:53 +01:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* The standard format consists of a header and an array of metafile records.
|
|
|
|
*
|
1999-05-02 11:23:51 +02:00
|
|
|
*/
|
1998-03-15 21:29:56 +01:00
|
|
|
|
|
|
|
#include <string.h>
|
1999-01-20 15:11:07 +01:00
|
|
|
#include <assert.h>
|
1998-03-15 21:29:56 +01:00
|
|
|
#include "winbase.h"
|
1999-03-18 18:39:57 +01:00
|
|
|
#include "wingdi.h"
|
1999-02-22 11:16:00 +01:00
|
|
|
#include "wine/winestring.h"
|
1998-11-07 13:56:31 +01:00
|
|
|
#include "winerror.h"
|
1999-05-02 11:23:51 +02:00
|
|
|
#include "enhmetafile.h"
|
1999-05-23 12:25:25 +02:00
|
|
|
#include "debugtools.h"
|
1999-05-02 11:23:51 +02:00
|
|
|
#include "heap.h"
|
1999-12-04 04:56:53 +01:00
|
|
|
#include "metafile.h"
|
1998-03-15 21:29:56 +01:00
|
|
|
|
1999-05-02 11:23:51 +02:00
|
|
|
DEFAULT_DEBUG_CHANNEL(enhmetafile)
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* EMF_Create_HENHMETAFILE
|
|
|
|
*/
|
|
|
|
HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, HFILE hFile, HANDLE
|
|
|
|
hMapping )
|
|
|
|
{
|
|
|
|
HENHMETAFILE hmf = GDI_AllocObject( sizeof(ENHMETAFILEOBJ),
|
|
|
|
ENHMETAFILE_MAGIC );
|
|
|
|
ENHMETAFILEOBJ *metaObj = (ENHMETAFILEOBJ *)GDI_HEAP_LOCK( hmf );
|
|
|
|
metaObj->emh = emh;
|
|
|
|
metaObj->hFile = hFile;
|
|
|
|
metaObj->hMapping = hMapping;
|
|
|
|
GDI_HEAP_UNLOCK( hmf );
|
|
|
|
return hmf;
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* EMF_Delete_HENHMETAFILE
|
|
|
|
*/
|
|
|
|
static BOOL EMF_Delete_HENHMETAFILE( HENHMETAFILE hmf )
|
|
|
|
{
|
|
|
|
ENHMETAFILEOBJ *metaObj = (ENHMETAFILEOBJ *)GDI_GetObjPtr( hmf,
|
|
|
|
ENHMETAFILE_MAGIC );
|
|
|
|
if(!metaObj) return FALSE;
|
|
|
|
if(metaObj->hMapping) {
|
|
|
|
UnmapViewOfFile( metaObj->emh );
|
|
|
|
CloseHandle( metaObj->hMapping );
|
|
|
|
CloseHandle( metaObj->hFile );
|
|
|
|
} else
|
2000-02-16 23:47:24 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, metaObj->emh );
|
1999-05-02 11:23:51 +02:00
|
|
|
return GDI_FreeObject( hmf );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* EMF_GetEnhMetaHeader
|
|
|
|
*
|
|
|
|
* Returns ptr to ENHMETAHEADER associated with HENHMETAFILE
|
|
|
|
* Should be followed by call to EMF_ReleaseEnhMetaHeader
|
|
|
|
*/
|
|
|
|
static ENHMETAHEADER *EMF_GetEnhMetaHeader( HENHMETAFILE hmf )
|
|
|
|
{
|
|
|
|
ENHMETAFILEOBJ *metaObj = (ENHMETAFILEOBJ *)GDI_GetObjPtr( hmf,
|
|
|
|
ENHMETAFILE_MAGIC );
|
1999-05-23 12:25:25 +02:00
|
|
|
TRACE("hmf %04x -> enhmetaObj %p\n", hmf, metaObj);
|
1999-06-12 08:49:52 +02:00
|
|
|
return metaObj ? metaObj->emh : NULL;
|
1999-05-02 11:23:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* EMF_ReleaseEnhMetaHeader
|
|
|
|
*
|
|
|
|
* Releases ENHMETAHEADER associated with HENHMETAFILE
|
|
|
|
*/
|
|
|
|
static BOOL EMF_ReleaseEnhMetaHeader( HENHMETAFILE hmf )
|
|
|
|
{
|
|
|
|
return GDI_HEAP_UNLOCK( hmf );
|
|
|
|
}
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
/*****************************************************************************
|
1999-05-02 11:23:51 +02:00
|
|
|
* EMF_GetEnhMetaFile
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static HENHMETAFILE EMF_GetEnhMetaFile( HFILE hFile )
|
|
|
|
{
|
|
|
|
ENHMETAHEADER *emh;
|
|
|
|
HANDLE hMapping;
|
|
|
|
|
|
|
|
hMapping = CreateFileMappingA( hFile, NULL, PAGE_READONLY, 0, 0, NULL );
|
|
|
|
emh = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 );
|
|
|
|
|
|
|
|
if (emh->iType != EMR_HEADER || emh->dSignature != ENHMETA_SIGNATURE) {
|
1999-05-23 12:25:25 +02:00
|
|
|
WARN("Invalid emf header type 0x%08lx sig 0x%08lx.\n",
|
1999-05-02 11:23:51 +02:00
|
|
|
emh->iType, emh->dSignature);
|
|
|
|
UnmapViewOfFile( emh );
|
|
|
|
CloseHandle( hMapping );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return EMF_Create_HENHMETAFILE( emh, hFile, hMapping );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* GetEnhMetaFileA (GDI32.174)
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HENHMETAFILE WINAPI GetEnhMetaFileA(
|
1998-03-15 21:29:56 +01:00
|
|
|
LPCSTR lpszMetaFile /* filename of enhanced metafile */
|
|
|
|
)
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
HENHMETAFILE hmf;
|
|
|
|
HFILE hFile;
|
|
|
|
|
1999-06-12 08:49:52 +02:00
|
|
|
hFile = CreateFileA(lpszMetaFile, GENERIC_READ, FILE_SHARE_READ, 0,
|
|
|
|
OPEN_EXISTING, 0, 0);
|
1999-05-02 11:23:51 +02:00
|
|
|
if (hFile == INVALID_HANDLE_VALUE) {
|
1999-05-23 12:25:25 +02:00
|
|
|
WARN("could not open %s\n", lpszMetaFile);
|
1999-05-02 11:23:51 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
hmf = EMF_GetEnhMetaFile( hFile );
|
|
|
|
if(!hmf)
|
|
|
|
CloseHandle( hFile );
|
|
|
|
return hmf;
|
1998-03-15 21:29:56 +01:00
|
|
|
}
|
|
|
|
|
1998-12-10 16:49:22 +01:00
|
|
|
/*****************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* GetEnhMetaFileW (GDI32.180)
|
1998-12-10 16:49:22 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HENHMETAFILE WINAPI GetEnhMetaFileW(
|
1998-12-10 16:49:22 +01:00
|
|
|
LPCWSTR lpszMetaFile) /* filename of enhanced metafile */
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
HENHMETAFILE hmf;
|
|
|
|
HFILE hFile;
|
|
|
|
|
1999-06-12 08:49:52 +02:00
|
|
|
hFile = CreateFileW(lpszMetaFile, GENERIC_READ, FILE_SHARE_READ, 0,
|
|
|
|
OPEN_EXISTING, 0, 0);
|
1999-05-02 11:23:51 +02:00
|
|
|
if (hFile == INVALID_HANDLE_VALUE) {
|
1999-05-23 12:25:25 +02:00
|
|
|
WARN("could not open %s\n", debugstr_w(lpszMetaFile));
|
1999-05-02 11:23:51 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
hmf = EMF_GetEnhMetaFile( hFile );
|
|
|
|
if(!hmf)
|
|
|
|
CloseHandle( hFile );
|
|
|
|
return hmf;
|
1998-12-10 16:49:22 +01:00
|
|
|
}
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
/*****************************************************************************
|
1998-04-13 14:21:30 +02:00
|
|
|
* GetEnhMetaFileHeader (GDI32.178)
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
2000-04-13 17:57:34 +02:00
|
|
|
* If buf is NULL, returns the size of buffer required.
|
|
|
|
* Otherwise, copy up to bufsize bytes of enhanced metafile header into
|
|
|
|
* buf.
|
1998-03-15 21:29:56 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
UINT WINAPI GetEnhMetaFileHeader(
|
|
|
|
HENHMETAFILE hmf, /* enhanced metafile */
|
|
|
|
UINT bufsize, /* size of buffer */
|
1998-03-15 21:29:56 +01:00
|
|
|
LPENHMETAHEADER buf /* buffer */
|
|
|
|
)
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
LPENHMETAHEADER emh;
|
2000-04-13 17:57:34 +02:00
|
|
|
UINT size;
|
1999-05-02 11:23:51 +02:00
|
|
|
|
|
|
|
emh = EMF_GetEnhMetaHeader(hmf);
|
1999-06-12 08:49:52 +02:00
|
|
|
if(!emh) return FALSE;
|
2000-04-13 17:57:34 +02:00
|
|
|
size = emh->nSize;
|
|
|
|
if (!buf) {
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
size = min(size, bufsize);
|
|
|
|
memmove(buf, emh, size);
|
1999-05-02 11:23:51 +02:00
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
2000-04-13 17:57:34 +02:00
|
|
|
return size;
|
1998-03-15 21:29:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* GetEnhMetaFileDescriptionA (GDI32.176)
|
1998-04-13 14:21:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
UINT WINAPI GetEnhMetaFileDescriptionA(
|
|
|
|
HENHMETAFILE hmf, /* enhanced metafile */
|
|
|
|
UINT size, /* size of buf */
|
1998-04-13 14:21:30 +02:00
|
|
|
LPSTR buf /* buffer to receive description */
|
|
|
|
)
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
LPENHMETAHEADER emh = EMF_GetEnhMetaHeader(hmf);
|
2000-03-26 16:43:22 +02:00
|
|
|
INT first, first_A;
|
1999-05-02 11:23:51 +02:00
|
|
|
|
1999-06-12 08:49:52 +02:00
|
|
|
if(!emh) return FALSE;
|
1999-05-02 11:23:51 +02:00
|
|
|
if(emh->nDescription == 0 || emh->offDescription == 0) {
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!buf || !size ) {
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
|
|
|
return emh->nDescription;
|
|
|
|
}
|
|
|
|
|
1999-05-08 14:50:36 +02:00
|
|
|
first = lstrlenW( (WCHAR *) ((char *) emh + emh->offDescription));
|
1999-05-02 11:23:51 +02:00
|
|
|
|
1999-05-08 14:50:36 +02:00
|
|
|
lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription), size);
|
2000-08-06 04:41:16 +02:00
|
|
|
first_A = strlen( buf );
|
2000-03-26 16:43:22 +02:00
|
|
|
buf += first_A + 1;
|
1999-05-08 14:50:36 +02:00
|
|
|
lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription+2*(first+1)),
|
2000-03-26 16:43:22 +02:00
|
|
|
size - first_A - 1); /* i18n ready */
|
2000-08-06 04:41:16 +02:00
|
|
|
first_A += strlen(buf) + 1;
|
1999-05-02 11:23:51 +02:00
|
|
|
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
2000-03-26 16:43:22 +02:00
|
|
|
return min(size, first_A);
|
1998-04-13 14:21:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* GetEnhMetaFileDescriptionW (GDI32.177)
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* Copies the description string of an enhanced metafile into a buffer
|
|
|
|
* _buf_.
|
|
|
|
*
|
1998-04-13 14:21:30 +02:00
|
|
|
* If _buf_ is NULL, returns size of _buf_ required. Otherwise, returns
|
|
|
|
* number of characters copied.
|
1998-03-15 21:29:56 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
UINT WINAPI GetEnhMetaFileDescriptionW(
|
|
|
|
HENHMETAFILE hmf, /* enhanced metafile */
|
|
|
|
UINT size, /* size of buf */
|
1998-04-13 14:21:30 +02:00
|
|
|
LPWSTR buf /* buffer to receive description */
|
1998-03-15 21:29:56 +01:00
|
|
|
)
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
LPENHMETAHEADER emh = EMF_GetEnhMetaHeader(hmf);
|
1999-06-12 08:49:52 +02:00
|
|
|
|
|
|
|
if(!emh) return FALSE;
|
1999-05-02 11:23:51 +02:00
|
|
|
if(emh->nDescription == 0 || emh->offDescription == 0) {
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!buf || !size ) {
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
|
|
|
return emh->nDescription;
|
|
|
|
}
|
|
|
|
|
1999-05-08 14:50:36 +02:00
|
|
|
memmove(buf, (char *) emh + emh->offDescription,
|
2000-03-25 22:44:35 +01:00
|
|
|
min(size,emh->nDescription));
|
1999-05-02 11:23:51 +02:00
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
2000-03-25 22:44:35 +01:00
|
|
|
return min(size, emh->nDescription);
|
1998-03-15 21:29:56 +01:00
|
|
|
}
|
|
|
|
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* SetEnhMetaFileBits (GDI32.315)
|
|
|
|
*
|
|
|
|
* Creates an enhanced metafile by copying _bufsize_ bytes from _buf_.
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT bufsize, const BYTE *buf)
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
{
|
2000-02-16 23:47:24 +01:00
|
|
|
ENHMETAHEADER *emh = HeapAlloc( GetProcessHeap(), 0, bufsize );
|
1999-05-02 11:23:51 +02:00
|
|
|
memmove(emh, buf, bufsize);
|
|
|
|
return EMF_Create_HENHMETAFILE( emh, 0, 0 );
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* GetEnhMetaFileBits (GDI32.175)
|
|
|
|
*
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
UINT WINAPI GetEnhMetaFileBits(
|
|
|
|
HENHMETAFILE hmf,
|
|
|
|
UINT bufsize,
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
LPBYTE buf
|
1999-12-04 04:56:53 +01:00
|
|
|
)
|
|
|
|
{
|
2000-04-13 17:57:34 +02:00
|
|
|
LPENHMETAHEADER emh = EMF_GetEnhMetaHeader( hmf );
|
|
|
|
UINT size;
|
1999-12-04 04:56:53 +01:00
|
|
|
|
2000-04-13 17:57:34 +02:00
|
|
|
if(!emh) return 0;
|
1999-12-04 04:56:53 +01:00
|
|
|
|
2000-04-13 17:57:34 +02:00
|
|
|
size = emh->nBytes;
|
|
|
|
if( buf == NULL ) {
|
|
|
|
EMF_ReleaseEnhMetaHeader( hmf );
|
|
|
|
return size;
|
|
|
|
}
|
1999-12-04 04:56:53 +01:00
|
|
|
|
2000-04-13 17:57:34 +02:00
|
|
|
size = min( size, bufsize );
|
|
|
|
memmove(buf, emh, size);
|
1999-12-04 04:56:53 +01:00
|
|
|
|
2000-04-13 17:57:34 +02:00
|
|
|
EMF_ReleaseEnhMetaHeader( hmf );
|
|
|
|
return size;
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
}
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
/*****************************************************************************
|
1998-04-13 14:21:30 +02:00
|
|
|
* PlayEnhMetaFileRecord (GDI32.264)
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* Render a single enhanced metafile record in the device context hdc.
|
|
|
|
*
|
|
|
|
* RETURNS
|
1999-12-25 23:58:59 +01:00
|
|
|
* TRUE (non zero) on success, FALSE on error.
|
1998-03-15 21:29:56 +01:00
|
|
|
* BUGS
|
1998-03-29 21:44:57 +02:00
|
|
|
* Many unimplemented records.
|
1999-12-25 23:58:59 +01:00
|
|
|
* No error handling on record play failures (ie checking return codes)
|
1998-03-15 21:29:56 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI PlayEnhMetaFileRecord(
|
|
|
|
HDC hdc, /* device context in which to render EMF record */
|
|
|
|
LPHANDLETABLE handletable, /* array of handles to be used in rendering record */
|
1998-03-29 21:44:57 +02:00
|
|
|
const ENHMETARECORD *mr, /* EMF record to render */
|
1999-02-26 12:11:13 +01:00
|
|
|
UINT handles /* size of handle array */
|
1998-03-15 21:29:56 +01:00
|
|
|
)
|
|
|
|
{
|
|
|
|
int type;
|
1999-05-23 12:25:25 +02:00
|
|
|
TRACE(
|
1998-03-29 21:44:57 +02:00
|
|
|
"hdc = %08x, handletable = %p, record = %p, numHandles = %d\n",
|
|
|
|
hdc, handletable, mr, handles);
|
|
|
|
if (!mr) return FALSE;
|
1998-03-15 21:29:56 +01:00
|
|
|
|
1998-03-29 21:44:57 +02:00
|
|
|
type = mr->iType;
|
1998-03-15 21:29:56 +01:00
|
|
|
|
1999-05-23 12:25:25 +02:00
|
|
|
TRACE(" type=%d\n", type);
|
1998-03-15 21:29:56 +01:00
|
|
|
switch(type)
|
|
|
|
{
|
|
|
|
case EMR_HEADER:
|
2000-04-18 13:52:58 +02:00
|
|
|
break;
|
1998-03-15 21:29:56 +01:00
|
|
|
case EMR_EOF:
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
case EMR_GDICOMMENT:
|
1999-12-12 00:18:10 +01:00
|
|
|
{
|
|
|
|
PEMRGDICOMMENT lpGdiComment = (PEMRGDICOMMENT)mr;
|
|
|
|
/* In an enhanced metafile, there can be both public and private GDI comments */
|
|
|
|
GdiComment( hdc, lpGdiComment->cbData, lpGdiComment->Data );
|
|
|
|
break;
|
|
|
|
}
|
1998-03-29 21:44:57 +02:00
|
|
|
case EMR_SETMAPMODE:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETMAPMODE pSetMapMode = (PEMRSETMAPMODE) mr;
|
|
|
|
SetMapMode(hdc, pSetMapMode->iMode);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETBKMODE:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETBKMODE pSetBkMode = (PEMRSETBKMODE) mr;
|
|
|
|
SetBkMode(hdc, pSetBkMode->iMode);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETBKCOLOR:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETBKCOLOR pSetBkColor = (PEMRSETBKCOLOR) mr;
|
|
|
|
SetBkColor(hdc, pSetBkColor->crColor);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETPOLYFILLMODE:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETPOLYFILLMODE pSetPolyFillMode = (PEMRSETPOLYFILLMODE) mr;
|
|
|
|
SetPolyFillMode(hdc, pSetPolyFillMode->iMode);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETROP2:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETROP2 pSetROP2 = (PEMRSETROP2) mr;
|
|
|
|
SetROP2(hdc, pSetROP2->iMode);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETSTRETCHBLTMODE:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETSTRETCHBLTMODE pSetStretchBltMode = (PEMRSETSTRETCHBLTMODE) mr;
|
|
|
|
SetStretchBltMode(hdc, pSetStretchBltMode->iMode);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETTEXTALIGN:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETTEXTALIGN pSetTextAlign = (PEMRSETTEXTALIGN) mr;
|
|
|
|
SetTextAlign(hdc, pSetTextAlign->iMode);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETTEXTCOLOR:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETTEXTCOLOR pSetTextColor = (PEMRSETTEXTCOLOR) mr;
|
|
|
|
SetTextColor(hdc, pSetTextColor->crColor);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SAVEDC:
|
|
|
|
{
|
1999-02-26 12:11:13 +01:00
|
|
|
SaveDC(hdc);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_RESTOREDC:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRRESTOREDC pRestoreDC = (PEMRRESTOREDC) mr;
|
|
|
|
RestoreDC(hdc, pRestoreDC->iRelative);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_INTERSECTCLIPRECT:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRINTERSECTCLIPRECT pClipRect = (PEMRINTERSECTCLIPRECT) mr;
|
|
|
|
IntersectClipRect(hdc, pClipRect->rclClip.left, pClipRect->rclClip.top,
|
|
|
|
pClipRect->rclClip.right, pClipRect->rclClip.bottom);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SELECTOBJECT:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSELECTOBJECT pSelectObject = (PEMRSELECTOBJECT) mr;
|
|
|
|
if( pSelectObject->ihObject & 0x80000000 ) {
|
|
|
|
/* High order bit is set - it's a stock object
|
|
|
|
* Strip the high bit to get the index.
|
|
|
|
* See MSDN article Q142319
|
|
|
|
*/
|
|
|
|
SelectObject( hdc, GetStockObject( pSelectObject->ihObject &
|
|
|
|
0x7fffffff ) );
|
|
|
|
} else {
|
|
|
|
/* High order bit wasn't set - not a stock object
|
|
|
|
*/
|
|
|
|
SelectObject( hdc,
|
|
|
|
(handletable->objectHandle)[pSelectObject->ihObject] );
|
|
|
|
}
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_DELETEOBJECT:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRDELETEOBJECT pDeleteObject = (PEMRDELETEOBJECT) mr;
|
|
|
|
DeleteObject( (handletable->objectHandle)[pDeleteObject->ihObject]);
|
|
|
|
(handletable->objectHandle)[pDeleteObject->ihObject] = 0;
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETWINDOWORGEX:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETWINDOWORGEX pSetWindowOrgEx = (PEMRSETWINDOWORGEX) mr;
|
|
|
|
SetWindowOrgEx(hdc, pSetWindowOrgEx->ptlOrigin.x,
|
|
|
|
pSetWindowOrgEx->ptlOrigin.y, NULL);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETWINDOWEXTEX:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETWINDOWEXTEX pSetWindowExtEx = (PEMRSETWINDOWEXTEX) mr;
|
|
|
|
SetWindowExtEx(hdc, pSetWindowExtEx->szlExtent.cx,
|
|
|
|
pSetWindowExtEx->szlExtent.cy, NULL);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETVIEWPORTORGEX:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETVIEWPORTORGEX pSetViewportOrgEx = (PEMRSETVIEWPORTORGEX) mr;
|
|
|
|
SetViewportOrgEx(hdc, pSetViewportOrgEx->ptlOrigin.x,
|
|
|
|
pSetViewportOrgEx->ptlOrigin.y, NULL);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_SETVIEWPORTEXTEX:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRSETVIEWPORTEXTEX pSetViewportExtEx = (PEMRSETVIEWPORTEXTEX) mr;
|
|
|
|
SetViewportExtEx(hdc, pSetViewportExtEx->szlExtent.cx,
|
|
|
|
pSetViewportExtEx->szlExtent.cy, NULL);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_CREATEPEN:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRCREATEPEN pCreatePen = (PEMRCREATEPEN) mr;
|
|
|
|
(handletable->objectHandle)[pCreatePen->ihPen] =
|
|
|
|
CreatePenIndirect(&pCreatePen->lopn);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_EXTCREATEPEN:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMREXTCREATEPEN pPen = (PEMREXTCREATEPEN) mr;
|
|
|
|
LOGBRUSH lb;
|
|
|
|
lb.lbStyle = pPen->elp.elpBrushStyle;
|
|
|
|
lb.lbColor = pPen->elp.elpColor;
|
|
|
|
lb.lbHatch = pPen->elp.elpHatch;
|
|
|
|
|
|
|
|
if(pPen->offBmi || pPen->offBits)
|
|
|
|
FIXME("EMR_EXTCREATEPEN: Need to copy brush bitmap\n");
|
|
|
|
|
|
|
|
(handletable->objectHandle)[pPen->ihPen] =
|
|
|
|
ExtCreatePen(pPen->elp.elpPenStyle, pPen->elp.elpWidth, &lb,
|
|
|
|
pPen->elp.elpNumEntries, pPen->elp.elpStyleEntry);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_CREATEBRUSHINDIRECT:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRCREATEBRUSHINDIRECT pBrush = (PEMRCREATEBRUSHINDIRECT) mr;
|
|
|
|
(handletable->objectHandle)[pBrush->ihBrush] =
|
|
|
|
CreateBrushIndirect(&pBrush->lb);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_EXTCREATEFONTINDIRECTW:
|
2000-04-18 13:52:58 +02:00
|
|
|
{
|
|
|
|
PEMREXTCREATEFONTINDIRECTW pFont = (PEMREXTCREATEFONTINDIRECTW) mr;
|
|
|
|
(handletable->objectHandle)[pFont->ihFont] =
|
|
|
|
CreateFontIndirectW(&pFont->elfw.elfLogFont);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
2000-04-18 13:52:58 +02:00
|
|
|
}
|
1998-03-29 21:44:57 +02:00
|
|
|
case EMR_MOVETOEX:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRMOVETOEX pMoveToEx = (PEMRMOVETOEX) mr;
|
|
|
|
MoveToEx(hdc, pMoveToEx->ptl.x, pMoveToEx->ptl.y, NULL);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_LINETO:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRLINETO pLineTo = (PEMRLINETO) mr;
|
|
|
|
LineTo(hdc, pLineTo->ptl.x, pLineTo->ptl.y);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_RECTANGLE:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRRECTANGLE pRect = (PEMRRECTANGLE) mr;
|
|
|
|
Rectangle(hdc, pRect->rclBox.left, pRect->rclBox.top,
|
|
|
|
pRect->rclBox.right, pRect->rclBox.bottom);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_ELLIPSE:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRELLIPSE pEllipse = (PEMRELLIPSE) mr;
|
|
|
|
Ellipse(hdc, pEllipse->rclBox.left, pEllipse->rclBox.top,
|
|
|
|
pEllipse->rclBox.right, pEllipse->rclBox.bottom);
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EMR_POLYGON16:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRPOLYGON16 pPoly = (PEMRPOLYGON16) mr;
|
|
|
|
/* Shouldn't use Polygon16 since pPoly->cpts is DWORD */
|
|
|
|
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
|
|
|
|
pPoly->cpts * sizeof(POINT) );
|
|
|
|
DWORD i;
|
|
|
|
for(i = 0; i < pPoly->cpts; i++)
|
|
|
|
CONV_POINT16TO32(pPoly->apts + i, pts + i);
|
|
|
|
Polygon(hdc, pts, pPoly->cpts);
|
|
|
|
HeapFree( GetProcessHeap(), 0, pts );
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
case EMR_POLYLINE16:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRPOLYLINE16 pPoly = (PEMRPOLYLINE16) mr;
|
|
|
|
/* Shouldn't use Polyline16 since pPoly->cpts is DWORD */
|
|
|
|
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
|
|
|
|
pPoly->cpts * sizeof(POINT) );
|
|
|
|
DWORD i;
|
|
|
|
for(i = 0; i < pPoly->cpts; i++)
|
|
|
|
CONV_POINT16TO32(pPoly->apts + i, pts + i);
|
|
|
|
Polyline(hdc, pts, pPoly->cpts);
|
|
|
|
HeapFree( GetProcessHeap(), 0, pts );
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
break;
|
|
|
|
}
|
2000-04-18 13:52:58 +02:00
|
|
|
|
1998-03-29 21:44:57 +02:00
|
|
|
case EMR_POLYPOLYGON16:
|
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRPOLYPOLYGON16 pPolyPoly = (PEMRPOLYPOLYGON16) mr;
|
|
|
|
/* NB POINTS array doesn't start at pPolyPoly->apts it's actually
|
|
|
|
pPolyPoly->aPolyCounts + pPolyPoly->nPolys */
|
1999-12-12 00:18:10 +01:00
|
|
|
|
2000-04-18 13:52:58 +02:00
|
|
|
POINT *pts = HeapAlloc( GetProcessHeap(), 0,
|
|
|
|
pPolyPoly->cpts * sizeof(POINT) );
|
|
|
|
DWORD i;
|
|
|
|
for(i = 0; i < pPolyPoly->cpts; i++)
|
|
|
|
CONV_POINT16TO32((POINTS*) (pPolyPoly->aPolyCounts +
|
|
|
|
pPolyPoly->nPolys) + i, pts + i);
|
1999-12-12 00:18:10 +01:00
|
|
|
|
2000-04-18 13:52:58 +02:00
|
|
|
PolyPolygon(hdc, pts, (INT*)pPolyPoly->aPolyCounts, pPolyPoly->nPolys);
|
|
|
|
HeapFree( GetProcessHeap(), 0, pts );
|
1998-03-29 21:44:57 +02:00
|
|
|
break;
|
|
|
|
}
|
2000-04-18 13:52:58 +02:00
|
|
|
|
1999-02-09 15:08:57 +01:00
|
|
|
case EMR_STRETCHDIBITS:
|
|
|
|
{
|
|
|
|
LONG xDest = mr->dParm[4];
|
|
|
|
LONG yDest = mr->dParm[5];
|
|
|
|
LONG xSrc = mr->dParm[6];
|
|
|
|
LONG ySrc = mr->dParm[7];
|
|
|
|
LONG cxSrc = mr->dParm[8];
|
|
|
|
LONG cySrc = mr->dParm[9];
|
|
|
|
DWORD offBmiSrc = mr->dParm[10];
|
|
|
|
DWORD offBitsSrc = mr->dParm[12];
|
|
|
|
DWORD iUsageSrc = mr->dParm[14];
|
|
|
|
DWORD dwRop = mr->dParm[15];
|
|
|
|
LONG cxDest = mr->dParm[16];
|
|
|
|
LONG cyDest = mr->dParm[17];
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
StretchDIBits(hdc,xDest,yDest,cxDest,cyDest,
|
1999-02-09 15:08:57 +01:00
|
|
|
xSrc,ySrc,cxSrc,cySrc,
|
|
|
|
((char *)mr)+offBitsSrc,
|
|
|
|
(const BITMAPINFO *)(((char *)mr)+offBmiSrc),
|
|
|
|
iUsageSrc,dwRop);
|
|
|
|
break;
|
1999-12-12 00:18:10 +01:00
|
|
|
}
|
1998-03-29 21:44:57 +02:00
|
|
|
case EMR_EXTTEXTOUTW:
|
|
|
|
{
|
|
|
|
/* 0-3: ??? */
|
|
|
|
DWORD flags = mr->dParm[4];
|
|
|
|
/* 5, 6: ??? */
|
|
|
|
DWORD x = mr->dParm[7], y = mr->dParm[8];
|
|
|
|
DWORD count = mr->dParm[9];
|
|
|
|
/* 10-16: ??? */
|
|
|
|
LPWSTR str = (LPWSTR)& mr->dParm[17];
|
|
|
|
/* trailing info: dx array? */
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("Many ExtTextOut args not handled\n");
|
1999-02-26 12:11:13 +01:00
|
|
|
ExtTextOutW(hdc, x, y, flags, /* lpRect */ NULL,
|
1998-03-29 21:44:57 +02:00
|
|
|
str, count, /* lpDx */ NULL);
|
|
|
|
break;
|
|
|
|
}
|
1999-12-12 00:18:10 +01:00
|
|
|
|
|
|
|
case EMR_CREATEPALETTE:
|
|
|
|
{
|
|
|
|
PEMRCREATEPALETTE lpCreatePal = (PEMRCREATEPALETTE)mr;
|
|
|
|
|
|
|
|
(handletable->objectHandle)[ lpCreatePal->ihPal ] =
|
|
|
|
CreatePalette( &lpCreatePal->lgpl );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_SELECTPALETTE:
|
|
|
|
{
|
|
|
|
PEMRSELECTPALETTE lpSelectPal = (PEMRSELECTPALETTE)mr;
|
|
|
|
|
|
|
|
/* FIXME: Should this be forcing background mode? */
|
|
|
|
(handletable->objectHandle)[ lpSelectPal->ihPal ] =
|
|
|
|
SelectPalette( hdc, lpSelectPal->ihPal, FALSE );
|
|
|
|
break;
|
|
|
|
}
|
1998-03-29 21:44:57 +02:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_REALIZEPALETTE:
|
|
|
|
{
|
|
|
|
RealizePalette( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
case EMR_EXTSELECTCLIPRGN:
|
|
|
|
{
|
|
|
|
PEMREXTSELECTCLIPRGN lpRgn = (PEMREXTSELECTCLIPRGN)mr;
|
|
|
|
|
|
|
|
/* Need to make a region out of the RGNDATA we have */
|
|
|
|
ExtSelectClipRgn( hdc, ..., (INT)(lpRgn->iMode) );
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
1999-12-25 23:58:59 +01:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETMETARGN:
|
|
|
|
{
|
|
|
|
SetMetaRgn( hdc );
|
|
|
|
break;
|
|
|
|
}
|
1999-12-25 23:58:59 +01:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETWORLDTRANSFORM:
|
|
|
|
{
|
|
|
|
PEMRSETWORLDTRANSFORM lpXfrm = (PEMRSETWORLDTRANSFORM)mr;
|
1999-12-25 23:58:59 +01:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
SetWorldTransform( hdc, &lpXfrm->xform );
|
1999-12-25 23:58:59 +01:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
break;
|
|
|
|
}
|
1999-12-25 23:58:59 +01:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYBEZIER:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPOLYBEZIER lpPolyBez = (PEMRPOLYBEZIER)mr;
|
2000-04-18 13:52:58 +02:00
|
|
|
PolyBezier(hdc, (const LPPOINT)lpPolyBez->aptl, (UINT)lpPolyBez->cptl);
|
1999-12-25 23:58:59 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYGON:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPOLYGON lpPoly = (PEMRPOLYGON)mr;
|
|
|
|
Polygon( hdc, (const LPPOINT)lpPoly->aptl, (UINT)lpPoly->cptl );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYLINE:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPOLYLINE lpPolyLine = (PEMRPOLYLINE)mr;
|
2000-04-18 13:52:58 +02:00
|
|
|
Polyline(hdc, (const LPPOINT)lpPolyLine->aptl, (UINT)lpPolyLine->cptl);
|
1999-12-25 23:58:59 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYBEZIERTO:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPOLYBEZIERTO lpPolyBezierTo = (PEMRPOLYBEZIERTO)mr;
|
2000-04-18 13:52:58 +02:00
|
|
|
PolyBezierTo( hdc, (const LPPOINT)lpPolyBezierTo->aptl,
|
|
|
|
(UINT)lpPolyBezierTo->cptl );
|
1999-12-25 23:58:59 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYLINETO:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPOLYLINETO lpPolyLineTo = (PEMRPOLYLINETO)mr;
|
2000-04-18 13:52:58 +02:00
|
|
|
PolylineTo( hdc, (const LPPOINT)lpPolyLineTo->aptl,
|
|
|
|
(UINT)lpPolyLineTo->cptl );
|
1999-12-25 23:58:59 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYPOLYLINE:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRPOLYPOLYLINE pPolyPolyline = (PEMRPOLYPOLYLINE) mr;
|
|
|
|
/* NB Points at pPolyPolyline->aPolyCounts + pPolyPolyline->nPolys */
|
1999-12-25 23:58:59 +01:00
|
|
|
|
2000-04-18 13:52:58 +02:00
|
|
|
PolyPolyline(hdc, (LPPOINT)(pPolyPolyline->aPolyCounts +
|
|
|
|
pPolyPolyline->nPolys),
|
|
|
|
pPolyPolyline->aPolyCounts,
|
|
|
|
pPolyPolyline->nPolys );
|
1999-12-25 23:58:59 +01:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYPOLYGON:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
2000-04-18 13:52:58 +02:00
|
|
|
PEMRPOLYPOLYGON pPolyPolygon = (PEMRPOLYPOLYGON) mr;
|
1999-12-25 23:58:59 +01:00
|
|
|
|
2000-04-18 13:52:58 +02:00
|
|
|
/* NB Points at pPolyPolygon->aPolyCounts + pPolyPolygon->nPolys */
|
1999-12-25 23:58:59 +01:00
|
|
|
|
2000-04-18 13:52:58 +02:00
|
|
|
PolyPolygon(hdc, (LPPOINT)(pPolyPolygon->aPolyCounts +
|
|
|
|
pPolyPolygon->nPolys),
|
|
|
|
(INT*)pPolyPolygon->aPolyCounts, pPolyPolygon->nPolys );
|
1999-12-25 23:58:59 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETBRUSHORGEX:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSETBRUSHORGEX lpSetBrushOrgEx = (PEMRSETBRUSHORGEX)mr;
|
|
|
|
|
|
|
|
SetBrushOrgEx( hdc,
|
|
|
|
(INT)lpSetBrushOrgEx->ptlOrigin.x,
|
|
|
|
(INT)lpSetBrushOrgEx->ptlOrigin.y,
|
|
|
|
NULL );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETPIXELV:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSETPIXELV lpSetPixelV = (PEMRSETPIXELV)mr;
|
|
|
|
|
|
|
|
SetPixelV( hdc,
|
|
|
|
(INT)lpSetPixelV->ptlPixel.x,
|
|
|
|
(INT)lpSetPixelV->ptlPixel.y,
|
|
|
|
lpSetPixelV->crColor );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETMAPPERFLAGS:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSETMAPPERFLAGS lpSetMapperFlags = (PEMRSETMAPPERFLAGS)mr;
|
|
|
|
|
|
|
|
SetMapperFlags( hdc, lpSetMapperFlags->dwFlags );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETCOLORADJUSTMENT:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSETCOLORADJUSTMENT lpSetColorAdjust = (PEMRSETCOLORADJUSTMENT)mr;
|
|
|
|
|
|
|
|
SetColorAdjustment( hdc, &lpSetColorAdjust->ColorAdjustment );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_OFFSETCLIPRGN:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMROFFSETCLIPRGN lpOffsetClipRgn = (PEMROFFSETCLIPRGN)mr;
|
|
|
|
|
|
|
|
OffsetClipRgn( hdc,
|
|
|
|
(INT)lpOffsetClipRgn->ptlOffset.x,
|
|
|
|
(INT)lpOffsetClipRgn->ptlOffset.y );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_EXCLUDECLIPRECT:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMREXCLUDECLIPRECT lpExcludeClipRect = (PEMREXCLUDECLIPRECT)mr;
|
|
|
|
|
|
|
|
ExcludeClipRect( hdc,
|
|
|
|
lpExcludeClipRect->rclClip.left,
|
|
|
|
lpExcludeClipRect->rclClip.top,
|
|
|
|
lpExcludeClipRect->rclClip.right,
|
|
|
|
lpExcludeClipRect->rclClip.bottom );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SCALEVIEWPORTEXTEX:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSCALEVIEWPORTEXTEX lpScaleViewportExtEx = (PEMRSCALEVIEWPORTEXTEX)mr;
|
|
|
|
|
|
|
|
ScaleViewportExtEx( hdc,
|
|
|
|
lpScaleViewportExtEx->xNum,
|
|
|
|
lpScaleViewportExtEx->xDenom,
|
|
|
|
lpScaleViewportExtEx->yNum,
|
|
|
|
lpScaleViewportExtEx->yDenom,
|
|
|
|
NULL );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SCALEWINDOWEXTEX:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSCALEWINDOWEXTEX lpScaleWindowExtEx = (PEMRSCALEWINDOWEXTEX)mr;
|
|
|
|
|
|
|
|
ScaleWindowExtEx( hdc,
|
|
|
|
lpScaleWindowExtEx->xNum,
|
|
|
|
lpScaleWindowExtEx->xDenom,
|
|
|
|
lpScaleWindowExtEx->yNum,
|
|
|
|
lpScaleWindowExtEx->yDenom,
|
|
|
|
NULL );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_MODIFYWORLDTRANSFORM:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRMODIFYWORLDTRANSFORM lpModifyWorldTrans = (PEMRMODIFYWORLDTRANSFORM)mr;
|
|
|
|
|
|
|
|
ModifyWorldTransform( hdc, &lpModifyWorldTrans->xform,
|
|
|
|
lpModifyWorldTrans->iMode );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_ANGLEARC:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRANGLEARC lpAngleArc = (PEMRANGLEARC)mr;
|
|
|
|
|
|
|
|
AngleArc( hdc,
|
|
|
|
(INT)lpAngleArc->ptlCenter.x, (INT)lpAngleArc->ptlCenter.y,
|
|
|
|
lpAngleArc->nRadius, lpAngleArc->eStartAngle,
|
|
|
|
lpAngleArc->eSweepAngle );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_ROUNDRECT:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRROUNDRECT lpRoundRect = (PEMRROUNDRECT)mr;
|
|
|
|
|
|
|
|
RoundRect( hdc,
|
|
|
|
lpRoundRect->rclBox.left,
|
|
|
|
lpRoundRect->rclBox.top,
|
|
|
|
lpRoundRect->rclBox.right,
|
|
|
|
lpRoundRect->rclBox.bottom,
|
|
|
|
lpRoundRect->szlCorner.cx,
|
|
|
|
lpRoundRect->szlCorner.cy );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_ARC:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRARC lpArc = (PEMRARC)mr;
|
|
|
|
|
|
|
|
Arc( hdc,
|
|
|
|
(INT)lpArc->rclBox.left,
|
|
|
|
(INT)lpArc->rclBox.top,
|
|
|
|
(INT)lpArc->rclBox.right,
|
|
|
|
(INT)lpArc->rclBox.bottom,
|
|
|
|
(INT)lpArc->ptlStart.x,
|
|
|
|
(INT)lpArc->ptlStart.y,
|
|
|
|
(INT)lpArc->ptlEnd.x,
|
|
|
|
(INT)lpArc->ptlEnd.y );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_CHORD:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRCHORD lpChord = (PEMRCHORD)mr;
|
|
|
|
|
|
|
|
Chord( hdc,
|
|
|
|
(INT)lpChord->rclBox.left,
|
|
|
|
(INT)lpChord->rclBox.top,
|
|
|
|
(INT)lpChord->rclBox.right,
|
|
|
|
(INT)lpChord->rclBox.bottom,
|
|
|
|
(INT)lpChord->ptlStart.x,
|
|
|
|
(INT)lpChord->ptlStart.y,
|
|
|
|
(INT)lpChord->ptlEnd.x,
|
|
|
|
(INT)lpChord->ptlEnd.y );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_PIE:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPIE lpPie = (PEMRPIE)mr;
|
|
|
|
|
|
|
|
Pie( hdc,
|
|
|
|
(INT)lpPie->rclBox.left,
|
|
|
|
(INT)lpPie->rclBox.top,
|
|
|
|
(INT)lpPie->rclBox.right,
|
|
|
|
(INT)lpPie->rclBox.bottom,
|
|
|
|
(INT)lpPie->ptlStart.x,
|
|
|
|
(INT)lpPie->ptlStart.y,
|
|
|
|
(INT)lpPie->ptlEnd.x,
|
|
|
|
(INT)lpPie->ptlEnd.y );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_ARCTO:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRARC lpArcTo = (PEMRARC)mr;
|
|
|
|
|
|
|
|
ArcTo( hdc,
|
|
|
|
(INT)lpArcTo->rclBox.left,
|
|
|
|
(INT)lpArcTo->rclBox.top,
|
|
|
|
(INT)lpArcTo->rclBox.right,
|
|
|
|
(INT)lpArcTo->rclBox.bottom,
|
|
|
|
(INT)lpArcTo->ptlStart.x,
|
|
|
|
(INT)lpArcTo->ptlStart.y,
|
|
|
|
(INT)lpArcTo->ptlEnd.x,
|
|
|
|
(INT)lpArcTo->ptlEnd.y );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_EXTFLOODFILL:
|
|
|
|
{
|
|
|
|
PEMREXTFLOODFILL lpExtFloodFill = (PEMREXTFLOODFILL)mr;
|
|
|
|
|
|
|
|
ExtFloodFill( hdc,
|
|
|
|
(INT)lpExtFloodFill->ptlStart.x,
|
|
|
|
(INT)lpExtFloodFill->ptlStart.y,
|
|
|
|
lpExtFloodFill->crColor,
|
|
|
|
(UINT)lpExtFloodFill->iMode );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_POLYDRAW:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRPOLYDRAW lpPolyDraw = (PEMRPOLYDRAW)mr;
|
|
|
|
PolyDraw( hdc,
|
|
|
|
(const LPPOINT)lpPolyDraw->aptl,
|
|
|
|
lpPolyDraw->abTypes,
|
|
|
|
(INT)lpPolyDraw->cptl );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETARCDIRECTION:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSETARCDIRECTION lpSetArcDirection = (PEMRSETARCDIRECTION)mr;
|
|
|
|
SetArcDirection( hdc, (INT)lpSetArcDirection->iArcDirection );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SETMITERLIMIT:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSETMITERLIMIT lpSetMiterLimit = (PEMRSETMITERLIMIT)mr;
|
|
|
|
SetMiterLimit( hdc, lpSetMiterLimit->eMiterLimit, NULL );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_BEGINPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
BeginPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_ENDPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
EndPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_CLOSEFIGURE:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
CloseFigure( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_FILLPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
/*PEMRFILLPATH lpFillPath = (PEMRFILLPATH)mr;*/
|
|
|
|
FillPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_STROKEANDFILLPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
/*PEMRSTROKEANDFILLPATH lpStrokeAndFillPath = (PEMRSTROKEANDFILLPATH)mr;*/
|
|
|
|
StrokeAndFillPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_STROKEPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
/*PEMRSTROKEPATH lpStrokePath = (PEMRSTROKEPATH)mr;*/
|
|
|
|
StrokePath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_FLATTENPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
FlattenPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_WIDENPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
WidenPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_SELECTCLIPPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
PEMRSELECTCLIPPATH lpSelectClipPath = (PEMRSELECTCLIPPATH)mr;
|
|
|
|
SelectClipPath( hdc, (INT)lpSelectClipPath->iMode );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_ABORTPATH:
|
1999-12-25 23:58:59 +01:00
|
|
|
{
|
|
|
|
AbortPath( hdc );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2000-01-15 23:17:49 +01:00
|
|
|
case EMR_CREATECOLORSPACE:
|
|
|
|
{
|
|
|
|
PEMRCREATECOLORSPACE lpCreateColorSpace = (PEMRCREATECOLORSPACE)mr;
|
|
|
|
(handletable->objectHandle)[lpCreateColorSpace->ihCS] =
|
|
|
|
CreateColorSpaceA( &lpCreateColorSpace->lcs );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_SETCOLORSPACE:
|
|
|
|
{
|
|
|
|
PEMRSETCOLORSPACE lpSetColorSpace = (PEMRSETCOLORSPACE)mr;
|
|
|
|
SetColorSpace( hdc,
|
|
|
|
(handletable->objectHandle)[lpSetColorSpace->ihCS] );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_DELETECOLORSPACE:
|
|
|
|
{
|
|
|
|
PEMRDELETECOLORSPACE lpDeleteColorSpace = (PEMRDELETECOLORSPACE)mr;
|
|
|
|
DeleteColorSpace( (handletable->objectHandle)[lpDeleteColorSpace->ihCS] );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_SETICMMODE:
|
|
|
|
{
|
|
|
|
PERMSETICMMODE lpSetICMMode = (PERMSETICMMODE)mr;
|
2000-04-18 13:52:58 +02:00
|
|
|
SetICMMode( hdc, (INT)lpSetICMMode->iMode );
|
2000-01-15 23:17:49 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_PIXELFORMAT:
|
|
|
|
{
|
|
|
|
INT iPixelFormat;
|
|
|
|
PEMRPIXELFORMAT lpPixelFormat = (PEMRPIXELFORMAT)mr;
|
|
|
|
|
|
|
|
iPixelFormat = ChoosePixelFormat( hdc, &lpPixelFormat->pfd );
|
|
|
|
SetPixelFormat( hdc, iPixelFormat, &lpPixelFormat->pfd );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_SETPALETTEENTRIES:
|
|
|
|
{
|
|
|
|
PEMRSETPALETTEENTRIES lpSetPaletteEntries = (PEMRSETPALETTEENTRIES)mr;
|
|
|
|
|
|
|
|
SetPaletteEntries( (handletable->objectHandle)[lpSetPaletteEntries->ihPal],
|
|
|
|
(UINT)lpSetPaletteEntries->iStart,
|
|
|
|
(UINT)lpSetPaletteEntries->cEntries,
|
|
|
|
lpSetPaletteEntries->aPalEntries );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_RESIZEPALETTE:
|
|
|
|
{
|
|
|
|
PEMRRESIZEPALETTE lpResizePalette = (PEMRRESIZEPALETTE)mr;
|
|
|
|
|
|
|
|
ResizePalette( (handletable->objectHandle)[lpResizePalette->ihPal],
|
|
|
|
(UINT)lpResizePalette->cEntries );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case EMR_CREATEDIBPATTERNBRUSHPT:
|
|
|
|
{
|
|
|
|
PEMRCREATEDIBPATTERNBRUSHPT lpCreate = (PEMRCREATEDIBPATTERNBRUSHPT)mr;
|
|
|
|
|
|
|
|
/* This is a BITMAPINFO struct followed directly by bitmap bits */
|
|
|
|
LPVOID lpPackedStruct = HeapAlloc( GetProcessHeap(),
|
|
|
|
0,
|
|
|
|
lpCreate->cbBmi + lpCreate->cbBits );
|
|
|
|
/* Now pack this structure */
|
|
|
|
memcpy( lpPackedStruct,
|
|
|
|
((BYTE*)lpCreate) + lpCreate->offBmi,
|
|
|
|
lpCreate->cbBmi );
|
|
|
|
memcpy( ((BYTE*)lpPackedStruct) + lpCreate->cbBmi,
|
|
|
|
((BYTE*)lpCreate) + lpCreate->offBits,
|
|
|
|
lpCreate->cbBits );
|
|
|
|
|
|
|
|
(handletable->objectHandle)[lpCreate->ihBrush] =
|
|
|
|
CreateDIBPatternBrushPt( lpPackedStruct,
|
|
|
|
(UINT)lpCreate->iUsage );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
1999-12-25 23:58:59 +01:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
case EMR_BITBLT:
|
|
|
|
case EMR_STRETCHBLT:
|
|
|
|
case EMR_MASKBLT:
|
|
|
|
case EMR_PLGBLT:
|
|
|
|
case EMR_SETDIBITSTODEVICE:
|
|
|
|
case EMR_EXTTEXTOUTA:
|
|
|
|
case EMR_POLYBEZIER16:
|
|
|
|
case EMR_POLYBEZIERTO16:
|
|
|
|
case EMR_POLYLINETO16:
|
|
|
|
case EMR_POLYPOLYLINE16:
|
|
|
|
case EMR_POLYDRAW16:
|
|
|
|
case EMR_CREATEMONOBRUSH:
|
|
|
|
case EMR_POLYTEXTOUTA:
|
|
|
|
case EMR_POLYTEXTOUTW:
|
1999-12-25 23:58:59 +01:00
|
|
|
case EMR_FILLRGN:
|
|
|
|
case EMR_FRAMERGN:
|
|
|
|
case EMR_INVERTRGN:
|
|
|
|
case EMR_PAINTRGN:
|
2000-01-15 23:17:49 +01:00
|
|
|
case EMR_GLSRECORD:
|
|
|
|
case EMR_GLSBOUNDEDRECORD:
|
1998-03-29 21:44:57 +02:00
|
|
|
default:
|
1999-12-25 23:58:59 +01:00
|
|
|
/* From docs: If PlayEnhMetaFileRecord doesn't recognize a
|
|
|
|
record then ignore and return TRUE. */
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("type %d is unimplemented\n", type);
|
1998-03-15 21:29:56 +01:00
|
|
|
break;
|
|
|
|
}
|
1998-03-29 21:44:57 +02:00
|
|
|
return TRUE;
|
1998-03-15 21:29:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
*
|
2000-03-28 22:22:59 +02:00
|
|
|
* EnumEnhMetaFile (GDI32.79)
|
1998-03-15 21:29:56 +01:00
|
|
|
*
|
|
|
|
* Walk an enhanced metafile, calling a user-specified function _EnhMetaFunc_
|
|
|
|
* for each
|
|
|
|
* record. Returns when either every record has been used or
|
|
|
|
* when _EnhMetaFunc_ returns FALSE.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* TRUE if every record is used, FALSE if any invocation of _EnhMetaFunc_
|
|
|
|
* returns FALSE.
|
|
|
|
*
|
|
|
|
* BUGS
|
1998-03-29 21:44:57 +02:00
|
|
|
* Ignores rect.
|
1998-03-15 21:29:56 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI EnumEnhMetaFile(
|
|
|
|
HDC hdc, /* device context to pass to _EnhMetaFunc_ */
|
|
|
|
HENHMETAFILE hmf, /* EMF to walk */
|
|
|
|
ENHMFENUMPROC callback, /* callback function */
|
1998-03-15 21:29:56 +01:00
|
|
|
LPVOID data, /* optional data for callback function */
|
2000-03-30 22:22:41 +02:00
|
|
|
const RECT *lpRect /* bounding rectangle for rendered metafile */
|
1998-03-15 21:29:56 +01:00
|
|
|
)
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
BOOL ret = TRUE;
|
2000-04-13 17:57:34 +02:00
|
|
|
LPENHMETAHEADER emh = EMF_GetEnhMetaHeader(hmf);
|
2000-03-30 22:22:41 +02:00
|
|
|
INT count, i;
|
1999-06-12 08:49:52 +02:00
|
|
|
HANDLETABLE *ht;
|
1999-05-02 11:23:51 +02:00
|
|
|
INT savedMode = 0;
|
2000-04-13 17:57:34 +02:00
|
|
|
FLOAT xSrcPixSize, ySrcPixSize, xscale, yscale;
|
|
|
|
XFORM savedXform, xform;
|
1999-06-12 08:49:52 +02:00
|
|
|
|
2000-04-13 17:57:34 +02:00
|
|
|
if(!emh) {
|
|
|
|
SetLastError(ERROR_INVALID_HANDLE);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if(!lpRect) {
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
count = emh->nHandles;
|
2000-03-30 22:22:41 +02:00
|
|
|
ht = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
|
|
sizeof(HANDLETABLE) * count );
|
|
|
|
ht->objectHandle[0] = hmf;
|
2000-04-13 17:57:34 +02:00
|
|
|
|
|
|
|
xSrcPixSize = (FLOAT) emh->szlMillimeters.cx / emh->szlDevice.cx;
|
|
|
|
ySrcPixSize = (FLOAT) emh->szlMillimeters.cy / emh->szlDevice.cy;
|
|
|
|
xscale = (FLOAT)(lpRect->right - lpRect->left) * 100.0 /
|
|
|
|
(emh->rclFrame.right - emh->rclFrame.left) * xSrcPixSize;
|
|
|
|
yscale = (FLOAT)(lpRect->bottom - lpRect->top) * 100.0 /
|
|
|
|
(emh->rclFrame.bottom - emh->rclFrame.top) * ySrcPixSize;
|
|
|
|
|
|
|
|
xform.eM11 = xscale;
|
|
|
|
xform.eM12 = 0;
|
|
|
|
xform.eM21 = 0;
|
|
|
|
xform.eM22 = yscale;
|
|
|
|
if(emh->rclFrame.left || emh->rclFrame.top)
|
|
|
|
FIXME("Can't cope with nonzero rclFrame origin yet\n");
|
|
|
|
/* eDx = lpRect->left - (lpRect width) / (rclFrame width) * rclFrame.left ? */
|
|
|
|
xform.eDx = lpRect->left;
|
|
|
|
xform.eDy = lpRect->top;
|
|
|
|
savedMode = SetGraphicsMode(hdc, GM_ADVANCED);
|
|
|
|
GetWorldTransform(hdc, &savedXform);
|
|
|
|
if (!ModifyWorldTransform(hdc, &xform, MWT_LEFTMULTIPLY)) {
|
|
|
|
ERR("World transform failed!\n");
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
}
|
2000-04-13 17:57:34 +02:00
|
|
|
|
2000-03-30 22:22:41 +02:00
|
|
|
while (ret) {
|
2000-04-13 17:57:34 +02:00
|
|
|
ret = (*callback)(hdc, ht, (LPENHMETARECORD) emh, count, data);
|
|
|
|
if (emh->iType == EMR_EOF) break;
|
|
|
|
emh = (LPENHMETAHEADER) ((char *) emh + emh->nSize);
|
1999-05-02 11:23:51 +02:00
|
|
|
}
|
2000-03-30 22:22:41 +02:00
|
|
|
for(i = 1; i < count; i++) /* Don't delete element 0 (hmf) */
|
|
|
|
if( (ht->objectHandle)[i] )
|
|
|
|
DeleteObject( (ht->objectHandle)[i] );
|
1999-05-02 11:23:51 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, ht );
|
|
|
|
EMF_ReleaseEnhMetaHeader(hmf);
|
2000-04-13 17:57:34 +02:00
|
|
|
SetWorldTransform(hdc, &savedXform);
|
1999-05-02 11:23:51 +02:00
|
|
|
if (savedMode) SetGraphicsMode(hdc, savedMode);
|
|
|
|
return ret;
|
1998-03-15 21:29:56 +01:00
|
|
|
}
|
|
|
|
|
2000-03-30 22:22:41 +02:00
|
|
|
static INT CALLBACK EMF_PlayEnhMetaFileCallback(HDC hdc, HANDLETABLE *ht,
|
|
|
|
ENHMETARECORD *emr,
|
|
|
|
INT handles, LPVOID data)
|
|
|
|
{
|
|
|
|
return PlayEnhMetaFileRecord(hdc, ht, emr, handles);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* PlayEnhMetaFile (GDI32.263)
|
|
|
|
*
|
|
|
|
* Renders an enhanced metafile into a specified rectangle *lpRect
|
|
|
|
* in device context hdc.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PlayEnhMetaFile(
|
|
|
|
HDC hdc, /* DC to render into */
|
|
|
|
HENHMETAFILE hmf, /* metafile to render */
|
|
|
|
const RECT *lpRect /* rectangle to place metafile inside */
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return EnumEnhMetaFile(hdc, hmf, EMF_PlayEnhMetaFileCallback, NULL,
|
|
|
|
lpRect);
|
|
|
|
}
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
/*****************************************************************************
|
1998-04-13 14:21:30 +02:00
|
|
|
* DeleteEnhMetaFile (GDI32.68)
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
*
|
|
|
|
* Deletes an enhanced metafile and frees the associated storage.
|
1998-03-15 21:29:56 +01:00
|
|
|
*/
|
1999-05-02 11:23:51 +02:00
|
|
|
BOOL WINAPI DeleteEnhMetaFile(HENHMETAFILE hmf)
|
|
|
|
{
|
|
|
|
return EMF_Delete_HENHMETAFILE( hmf );
|
1998-03-15 21:29:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
* CopyEnhMetaFileA (GDI32.21) Duplicate an enhanced metafile
|
|
|
|
*
|
|
|
|
*
|
1998-03-15 21:29:56 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HENHMETAFILE WINAPI CopyEnhMetaFileA(
|
1999-05-02 11:23:51 +02:00
|
|
|
HENHMETAFILE hmfSrc,
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
LPCSTR file)
|
|
|
|
{
|
1999-05-02 11:23:51 +02:00
|
|
|
ENHMETAHEADER *emrSrc = EMF_GetEnhMetaHeader( hmfSrc ), *emrDst;
|
|
|
|
HENHMETAFILE hmfDst;
|
|
|
|
|
1999-06-12 08:49:52 +02:00
|
|
|
if(!emrSrc) return FALSE;
|
1999-05-02 11:23:51 +02:00
|
|
|
if (!file) {
|
2000-02-16 23:47:24 +01:00
|
|
|
emrDst = HeapAlloc( GetProcessHeap(), 0, emrSrc->nBytes );
|
1999-05-02 11:23:51 +02:00
|
|
|
memcpy( emrDst, emrSrc, emrSrc->nBytes );
|
|
|
|
hmfDst = EMF_Create_HENHMETAFILE( emrDst, 0, 0 );
|
|
|
|
} else {
|
|
|
|
HFILE hFile;
|
|
|
|
hFile = CreateFileA( file, GENERIC_WRITE | GENERIC_READ, 0, NULL,
|
|
|
|
CREATE_ALWAYS, 0, -1);
|
|
|
|
WriteFile( hFile, emrSrc, emrSrc->nBytes, 0, 0);
|
|
|
|
hmfDst = EMF_GetEnhMetaFile( hFile );
|
|
|
|
}
|
|
|
|
EMF_ReleaseEnhMetaHeader( hmfSrc );
|
|
|
|
return hmfDst;
|
1998-03-29 21:44:57 +02:00
|
|
|
}
|
|
|
|
|
1999-05-02 11:23:51 +02:00
|
|
|
|
1999-12-12 00:18:10 +01:00
|
|
|
/* Struct to be used to be passed in the LPVOID parameter for cbEnhPaletteCopy */
|
|
|
|
typedef struct tagEMF_PaletteCopy
|
|
|
|
{
|
|
|
|
UINT cEntries;
|
|
|
|
LPPALETTEENTRY lpPe;
|
|
|
|
} EMF_PaletteCopy;
|
|
|
|
|
|
|
|
/***************************************************************
|
|
|
|
* Find the EMR_EOF record and then use it to find the
|
|
|
|
* palette entries for this enhanced metafile.
|
|
|
|
* The lpData is actually a pointer to a EMF_PaletteCopy struct
|
|
|
|
* which contains the max number of elements to copy and where
|
|
|
|
* to copy them to.
|
|
|
|
*
|
|
|
|
* NOTE: To be used by GetEnhMetaFilePaletteEntries only!
|
|
|
|
*/
|
|
|
|
INT CALLBACK cbEnhPaletteCopy( HDC a,
|
|
|
|
LPHANDLETABLE b,
|
|
|
|
LPENHMETARECORD lpEMR,
|
|
|
|
INT c,
|
|
|
|
LPVOID lpData )
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( lpEMR->iType == EMR_EOF )
|
|
|
|
{
|
|
|
|
PEMREOF lpEof = (PEMREOF)lpEMR;
|
|
|
|
EMF_PaletteCopy* info = (EMF_PaletteCopy*)lpData;
|
2000-03-25 22:44:35 +01:00
|
|
|
DWORD dwNumPalToCopy = min( lpEof->nPalEntries, info->cEntries );
|
1999-12-12 00:18:10 +01:00
|
|
|
|
|
|
|
TRACE( "copying 0x%08lx palettes\n", dwNumPalToCopy );
|
|
|
|
|
|
|
|
memcpy( (LPVOID)info->lpPe,
|
|
|
|
(LPVOID)(((LPSTR)lpEof) + lpEof->offPalEntries),
|
|
|
|
sizeof( *(info->lpPe) ) * dwNumPalToCopy );
|
|
|
|
|
|
|
|
/* Update the passed data as a return code */
|
|
|
|
info->lpPe = NULL; /* Palettes were copied! */
|
|
|
|
info->cEntries = (UINT)dwNumPalToCopy;
|
|
|
|
|
|
|
|
return FALSE; /* That's all we need */
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1998-11-07 13:56:31 +01:00
|
|
|
/*****************************************************************************
|
|
|
|
* GetEnhMetaFilePaletteEntries (GDI32.179)
|
|
|
|
*
|
|
|
|
* Copy the palette and report size
|
1999-12-12 00:18:10 +01:00
|
|
|
*
|
|
|
|
* BUGS: Error codes (SetLastError) are not set on failures
|
1998-11-07 13:56:31 +01:00
|
|
|
*/
|
1999-12-12 00:18:10 +01:00
|
|
|
UINT WINAPI GetEnhMetaFilePaletteEntries( HENHMETAFILE hEmf,
|
|
|
|
UINT cEntries,
|
|
|
|
LPPALETTEENTRY lpPe )
|
1998-11-07 13:56:31 +01:00
|
|
|
{
|
1999-12-12 00:18:10 +01:00
|
|
|
ENHMETAHEADER* enhHeader = EMF_GetEnhMetaHeader( hEmf );
|
|
|
|
UINT uReturnValue = GDI_ERROR;
|
|
|
|
EMF_PaletteCopy infoForCallBack;
|
|
|
|
|
|
|
|
TRACE( "(%04x,%d,%p)\n", hEmf, cEntries, lpPe );
|
|
|
|
|
|
|
|
/* First check if there are any palettes associated with
|
|
|
|
this metafile. */
|
|
|
|
if ( enhHeader->nPalEntries == 0 )
|
|
|
|
{
|
|
|
|
/* No palette associated with this enhanced metafile */
|
|
|
|
uReturnValue = 0;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Is the user requesting the number of palettes? */
|
|
|
|
if ( lpPe == NULL )
|
|
|
|
{
|
|
|
|
uReturnValue = (UINT)enhHeader->nPalEntries;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Copy cEntries worth of PALETTEENTRY structs into the buffer */
|
|
|
|
infoForCallBack.cEntries = cEntries;
|
|
|
|
infoForCallBack.lpPe = lpPe;
|
|
|
|
|
|
|
|
if ( !EnumEnhMetaFile( 0, hEmf, cbEnhPaletteCopy,
|
|
|
|
&infoForCallBack, NULL ) )
|
|
|
|
{
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Verify that the callback executed correctly */
|
|
|
|
if ( infoForCallBack.lpPe != NULL )
|
|
|
|
{
|
|
|
|
/* Callback proc had error! */
|
|
|
|
ERR( "cbEnhPaletteCopy didn't execute correctly\n" );
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
uReturnValue = infoForCallBack.cEntries;
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
|
|
|
EMF_ReleaseEnhMetaHeader( hEmf );
|
|
|
|
|
|
|
|
return uReturnValue;
|
1998-11-07 13:56:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* SetWinMetaFileBits (GDI32.343)
|
|
|
|
*
|
|
|
|
* Translate from old style to new style.
|
1999-12-04 04:56:53 +01:00
|
|
|
*
|
|
|
|
* BUGS: - This doesn't take the DC and scaling into account
|
|
|
|
* - Most record conversions aren't implemented
|
|
|
|
* - Handle slot assignement is primative and most likely doesn't work
|
1998-11-07 13:56:31 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HENHMETAFILE WINAPI SetWinMetaFileBits(UINT cbBuffer,
|
1998-11-07 13:56:31 +01:00
|
|
|
CONST BYTE *lpbBuffer,
|
1999-02-26 12:11:13 +01:00
|
|
|
HDC hdcRef,
|
|
|
|
CONST METAFILEPICT *lpmfp
|
1998-11-07 13:56:31 +01:00
|
|
|
)
|
|
|
|
{
|
1999-12-04 04:56:53 +01:00
|
|
|
HENHMETAFILE hMf;
|
|
|
|
LPVOID lpNewEnhMetaFileBuffer = NULL;
|
|
|
|
UINT uNewEnhMetaFileBufferSize = 0;
|
|
|
|
BOOL bFoundEOF = FALSE;
|
|
|
|
|
|
|
|
FIXME( "(%d,%p,%04x,%p):stub\n", cbBuffer, lpbBuffer, hdcRef, lpmfp );
|
|
|
|
|
|
|
|
/* 1. Get the header - skip over this and get straight to the records */
|
|
|
|
|
|
|
|
uNewEnhMetaFileBufferSize = sizeof( ENHMETAHEADER );
|
2000-02-16 23:47:24 +01:00
|
|
|
lpNewEnhMetaFileBuffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
|
1999-12-04 04:56:53 +01:00
|
|
|
uNewEnhMetaFileBufferSize );
|
|
|
|
|
|
|
|
if( lpNewEnhMetaFileBuffer == NULL )
|
|
|
|
{
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Fill in the header record */
|
|
|
|
{
|
|
|
|
LPENHMETAHEADER lpNewEnhMetaFileHeader = (LPENHMETAHEADER)lpNewEnhMetaFileBuffer;
|
|
|
|
|
|
|
|
lpNewEnhMetaFileHeader->iType = EMR_HEADER;
|
|
|
|
lpNewEnhMetaFileHeader->nSize = sizeof( ENHMETAHEADER );
|
|
|
|
|
|
|
|
/* FIXME: Not right. Must be able to get this from the DC */
|
|
|
|
lpNewEnhMetaFileHeader->rclBounds.left = 0;
|
|
|
|
lpNewEnhMetaFileHeader->rclBounds.right = 0;
|
|
|
|
lpNewEnhMetaFileHeader->rclBounds.top = 0;
|
|
|
|
lpNewEnhMetaFileHeader->rclBounds.bottom = 0;
|
|
|
|
|
|
|
|
/* FIXME: Not right. Must be able to get this from the DC */
|
|
|
|
lpNewEnhMetaFileHeader->rclFrame.left = 0;
|
|
|
|
lpNewEnhMetaFileHeader->rclFrame.right = 0;
|
|
|
|
lpNewEnhMetaFileHeader->rclFrame.top = 0;
|
|
|
|
lpNewEnhMetaFileHeader->rclFrame.bottom = 0;
|
|
|
|
|
|
|
|
lpNewEnhMetaFileHeader->nHandles = 0; /* No handles yet */
|
|
|
|
|
|
|
|
/* FIXME: Add in the rest of the fields to the header */
|
|
|
|
/* dSignature
|
|
|
|
nVersion
|
|
|
|
nRecords
|
|
|
|
sReserved
|
|
|
|
nDescription
|
|
|
|
offDescription
|
|
|
|
nPalEntries
|
|
|
|
szlDevice
|
|
|
|
szlMillimeters
|
|
|
|
cbPixelFormat
|
|
|
|
offPixelFormat,
|
|
|
|
bOpenGL */
|
|
|
|
}
|
|
|
|
|
|
|
|
(char*)lpbBuffer += ((METAHEADER*)lpbBuffer)->mtHeaderSize * 2; /* Point past the header - FIXME: metafile quirk? */
|
|
|
|
|
|
|
|
/* 2. Enum over individual records and convert them to the new type of records */
|
|
|
|
while( !bFoundEOF )
|
|
|
|
{
|
|
|
|
|
|
|
|
LPMETARECORD lpMetaRecord = (LPMETARECORD)lpbBuffer;
|
|
|
|
|
|
|
|
#define EMF_ReAllocAndAdjustPointers( a , b ) \
|
|
|
|
{ \
|
|
|
|
LPVOID lpTmp; \
|
2000-02-16 23:47:24 +01:00
|
|
|
lpTmp = HeapReAlloc( GetProcessHeap(), 0, \
|
1999-12-04 04:56:53 +01:00
|
|
|
lpNewEnhMetaFileBuffer, \
|
|
|
|
uNewEnhMetaFileBufferSize + (b) ); \
|
|
|
|
if( lpTmp == NULL ) { ERR( "No memory!\n" ); goto error; } \
|
|
|
|
lpNewEnhMetaFileBuffer = lpTmp; \
|
|
|
|
lpRecord = (a)( (char*)lpNewEnhMetaFileBuffer + uNewEnhMetaFileBufferSize ); \
|
|
|
|
uNewEnhMetaFileBufferSize += (b); \
|
|
|
|
}
|
|
|
|
|
|
|
|
switch( lpMetaRecord->rdFunction )
|
|
|
|
{
|
|
|
|
case META_EOF:
|
|
|
|
{
|
|
|
|
PEMREOF lpRecord;
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMREOF,uRecord);
|
|
|
|
|
|
|
|
/* Fill the new record - FIXME: This is not right */
|
|
|
|
lpRecord->emr.iType = EMR_EOF;
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
lpRecord->nPalEntries = 0; /* FIXME */
|
|
|
|
lpRecord->offPalEntries = 0; /* FIXME */
|
|
|
|
lpRecord->nSizeLast = 0; /* FIXME */
|
|
|
|
|
|
|
|
/* No more records after this one */
|
|
|
|
bFoundEOF = TRUE;
|
1998-11-07 13:56:31 +01:00
|
|
|
|
1999-12-04 04:56:53 +01:00
|
|
|
FIXME( "META_EOF conversion not correct\n" );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_SETMAPMODE:
|
|
|
|
{
|
|
|
|
PEMRSETMAPMODE lpRecord;
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRSETMAPMODE,uRecord);
|
|
|
|
|
|
|
|
lpRecord->emr.iType = EMR_SETMAPMODE;
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->iMode = lpMetaRecord->rdParm[0];
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_DELETEOBJECT: /* Select and Delete structures are the same */
|
|
|
|
case META_SELECTOBJECT:
|
|
|
|
{
|
|
|
|
PEMRDELETEOBJECT lpRecord;
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRDELETEOBJECT,uRecord);
|
|
|
|
|
|
|
|
if( lpMetaRecord->rdFunction == META_DELETEOBJECT )
|
|
|
|
{
|
|
|
|
lpRecord->emr.iType = EMR_DELETEOBJECT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lpRecord->emr.iType = EMR_SELECTOBJECT;
|
|
|
|
}
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->ihObject = lpMetaRecord->rdParm[0]; /* FIXME: Handle */
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_POLYGON: /* This is just plain busted. I don't know what I'm doing */
|
|
|
|
{
|
|
|
|
PEMRPOLYGON16 lpRecord; /* FIXME: Should it be a poly or poly16? */
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRPOLYGON16,uRecord);
|
|
|
|
|
|
|
|
/* FIXME: This is mostly all wrong */
|
1999-12-12 00:18:10 +01:00
|
|
|
lpRecord->emr.iType = EMR_POLYGON16;
|
1999-12-04 04:56:53 +01:00
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->rclBounds.left = 0;
|
|
|
|
lpRecord->rclBounds.right = 0;
|
|
|
|
lpRecord->rclBounds.top = 0;
|
|
|
|
lpRecord->rclBounds.bottom = 0;
|
|
|
|
|
|
|
|
lpRecord->cpts = 0;
|
|
|
|
lpRecord->apts[0].x = 0;
|
|
|
|
lpRecord->apts[0].y = 0;
|
|
|
|
|
|
|
|
FIXME( "META_POLYGON conversion not correct\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_SETPOLYFILLMODE:
|
|
|
|
{
|
|
|
|
PEMRSETPOLYFILLMODE lpRecord;
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRSETPOLYFILLMODE,uRecord);
|
|
|
|
|
|
|
|
lpRecord->emr.iType = EMR_SETPOLYFILLMODE;
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->iMode = lpMetaRecord->rdParm[0];
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_SETWINDOWORG:
|
|
|
|
{
|
|
|
|
PEMRSETWINDOWORGEX lpRecord; /* Seems to be the closest thing */
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRSETWINDOWORGEX,uRecord);
|
|
|
|
|
|
|
|
lpRecord->emr.iType = EMR_SETWINDOWORGEX;
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->ptlOrigin.x = lpMetaRecord->rdParm[1];
|
|
|
|
lpRecord->ptlOrigin.y = lpMetaRecord->rdParm[0];
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_SETWINDOWEXT: /* Structure is the same for SETWINDOWEXT & SETVIEWPORTEXT */
|
|
|
|
case META_SETVIEWPORTEXT:
|
|
|
|
{
|
|
|
|
PEMRSETWINDOWEXTEX lpRecord;
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRSETWINDOWEXTEX,uRecord);
|
|
|
|
|
|
|
|
if ( lpMetaRecord->rdFunction == META_SETWINDOWEXT )
|
|
|
|
{
|
|
|
|
lpRecord->emr.iType = EMR_SETWINDOWORGEX;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lpRecord->emr.iType = EMR_SETVIEWPORTEXTEX;
|
|
|
|
}
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->szlExtent.cx = lpMetaRecord->rdParm[1];
|
|
|
|
lpRecord->szlExtent.cy = lpMetaRecord->rdParm[0];
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case META_CREATEBRUSHINDIRECT:
|
|
|
|
{
|
|
|
|
PEMRCREATEBRUSHINDIRECT lpRecord;
|
|
|
|
size_t uRecord = sizeof(*lpRecord);
|
|
|
|
|
|
|
|
EMF_ReAllocAndAdjustPointers(PEMRCREATEBRUSHINDIRECT,uRecord);
|
|
|
|
|
|
|
|
lpRecord->emr.iType = EMR_CREATEBRUSHINDIRECT;
|
|
|
|
lpRecord->emr.nSize = sizeof( *lpRecord );
|
|
|
|
|
|
|
|
lpRecord->ihBrush = ((LPENHMETAHEADER)lpNewEnhMetaFileBuffer)->nHandles;
|
|
|
|
lpRecord->lb.lbStyle = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbStyle;
|
|
|
|
lpRecord->lb.lbColor = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbColor;
|
|
|
|
lpRecord->lb.lbHatch = ((LPLOGBRUSH16)lpMetaRecord->rdParm)->lbHatch;
|
|
|
|
|
|
|
|
((LPENHMETAHEADER)lpNewEnhMetaFileBuffer)->nHandles += 1; /* New handle */
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* These are all unimplemented and as such are intended to fall through to the default case */
|
|
|
|
case META_SETBKCOLOR:
|
|
|
|
case META_SETBKMODE:
|
|
|
|
case META_SETROP2:
|
|
|
|
case META_SETRELABS:
|
|
|
|
case META_SETSTRETCHBLTMODE:
|
|
|
|
case META_SETTEXTCOLOR:
|
|
|
|
case META_SETVIEWPORTORG:
|
|
|
|
case META_OFFSETWINDOWORG:
|
|
|
|
case META_SCALEWINDOWEXT:
|
|
|
|
case META_OFFSETVIEWPORTORG:
|
|
|
|
case META_SCALEVIEWPORTEXT:
|
|
|
|
case META_LINETO:
|
|
|
|
case META_MOVETO:
|
|
|
|
case META_EXCLUDECLIPRECT:
|
|
|
|
case META_INTERSECTCLIPRECT:
|
|
|
|
case META_ARC:
|
|
|
|
case META_ELLIPSE:
|
|
|
|
case META_FLOODFILL:
|
|
|
|
case META_PIE:
|
|
|
|
case META_RECTANGLE:
|
|
|
|
case META_ROUNDRECT:
|
|
|
|
case META_PATBLT:
|
|
|
|
case META_SAVEDC:
|
|
|
|
case META_SETPIXEL:
|
|
|
|
case META_OFFSETCLIPRGN:
|
|
|
|
case META_TEXTOUT:
|
|
|
|
case META_POLYPOLYGON:
|
|
|
|
case META_POLYLINE:
|
|
|
|
case META_RESTOREDC:
|
|
|
|
case META_CHORD:
|
|
|
|
case META_CREATEPATTERNBRUSH:
|
|
|
|
case META_CREATEPENINDIRECT:
|
|
|
|
case META_CREATEFONTINDIRECT:
|
|
|
|
case META_CREATEPALETTE:
|
|
|
|
case META_SETTEXTALIGN:
|
|
|
|
case META_SELECTPALETTE:
|
|
|
|
case META_SETMAPPERFLAGS:
|
|
|
|
case META_REALIZEPALETTE:
|
|
|
|
case META_ESCAPE:
|
|
|
|
case META_EXTTEXTOUT:
|
|
|
|
case META_STRETCHDIB:
|
|
|
|
case META_DIBSTRETCHBLT:
|
|
|
|
case META_STRETCHBLT:
|
|
|
|
case META_BITBLT:
|
|
|
|
case META_CREATEREGION:
|
|
|
|
case META_FILLREGION:
|
|
|
|
case META_FRAMEREGION:
|
|
|
|
case META_INVERTREGION:
|
|
|
|
case META_PAINTREGION:
|
|
|
|
case META_SELECTCLIPREGION:
|
|
|
|
case META_DIBCREATEPATTERNBRUSH:
|
|
|
|
case META_DIBBITBLT:
|
|
|
|
case META_SETTEXTCHAREXTRA:
|
|
|
|
case META_SETTEXTJUSTIFICATION:
|
|
|
|
case META_EXTFLOODFILL:
|
|
|
|
case META_SETDIBTODEV:
|
|
|
|
case META_DRAWTEXT:
|
|
|
|
case META_ANIMATEPALETTE:
|
|
|
|
case META_SETPALENTRIES:
|
|
|
|
case META_RESIZEPALETTE:
|
|
|
|
case META_RESETDC:
|
|
|
|
case META_STARTDOC:
|
|
|
|
case META_STARTPAGE:
|
|
|
|
case META_ENDPAGE:
|
|
|
|
case META_ABORTDOC:
|
|
|
|
case META_ENDDOC:
|
|
|
|
case META_CREATEBRUSH:
|
|
|
|
case META_CREATEBITMAPINDIRECT:
|
|
|
|
case META_CREATEBITMAP:
|
|
|
|
/* Fall through to unimplemented */
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
/* Not implemented yet */
|
|
|
|
FIXME( "Conversion of record type 0x%x not implemented.\n", lpMetaRecord->rdFunction );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Move to the next record */
|
|
|
|
(char*)lpbBuffer += ((LPMETARECORD)lpbBuffer)->rdSize * 2; /* FIXME: Seem to be doing this in metafile.c */
|
|
|
|
|
|
|
|
#undef ReAllocAndAdjustPointers
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We know the last of the header information now */
|
|
|
|
((LPENHMETAHEADER)lpNewEnhMetaFileBuffer)->nBytes = uNewEnhMetaFileBufferSize;
|
|
|
|
|
|
|
|
/* Create the enhanced metafile */
|
|
|
|
hMf = SetEnhMetaFileBits( uNewEnhMetaFileBufferSize, (const BYTE*)lpNewEnhMetaFileBuffer );
|
|
|
|
|
|
|
|
if( !hMf )
|
|
|
|
ERR( "Problem creating metafile. Did the conversion fail somewhere?\n" );
|
|
|
|
|
|
|
|
return hMf;
|
|
|
|
|
|
|
|
error:
|
|
|
|
/* Free the data associated with our copy since it's been copied */
|
2000-02-16 23:47:24 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, lpNewEnhMetaFileBuffer );
|
1999-12-04 04:56:53 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
1998-11-07 13:56:31 +01:00
|
|
|
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
|