mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +00:00
[GDI32] Meta File Fix Ups
Remove pointer hack. Safer since using wines Enhanced Meta headers with unknown wine magic information.
This commit is contained in:
parent
a73c17fcd9
commit
9f57320175
1 changed files with 11 additions and 5 deletions
|
@ -139,16 +139,22 @@ GdiCreateLocalMetaFilePict(HANDLE hmo)
|
||||||
{
|
{
|
||||||
static const WCHAR szDisplayW[] = { 'D','I','S','P','L','A','Y','\0' };
|
static const WCHAR szDisplayW[] = { 'D','I','S','P','L','A','Y','\0' };
|
||||||
HENHMETAFILE hEMF;
|
HENHMETAFILE hEMF;
|
||||||
PENHMETAHEADER pemh = (PENHMETAHEADER)Buffer;
|
ENHMETAHEADER emh;
|
||||||
|
|
||||||
pInfo->mm = MM_ANISOTROPIC;
|
|
||||||
pInfo->xExt = pemh->rclFrame.right - pemh->rclFrame.left; // Width
|
|
||||||
pInfo->yExt = pemh->rclFrame.bottom - pemh->rclFrame.top; // Height
|
|
||||||
|
|
||||||
hEMF = SetEnhMetaFileBits(nSize, Buffer);
|
hEMF = SetEnhMetaFileBits(nSize, Buffer);
|
||||||
if (hEMF == NULL)
|
if (hEMF == NULL)
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
|
if (!GetEnhMetaFileHeader( hEMF, sizeof(emh), &emh ))
|
||||||
|
{
|
||||||
|
DeleteEnhMetaFile(hEMF);
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pInfo->mm = MM_ANISOTROPIC; // wine uses MM_ISOTROPIC.
|
||||||
|
pInfo->xExt = emh.rclFrame.right - emh.rclFrame.left; // Width
|
||||||
|
pInfo->yExt = emh.rclFrame.bottom - emh.rclFrame.top; // Height
|
||||||
|
|
||||||
hDC = CreateDCW(szDisplayW, NULL, NULL, NULL);
|
hDC = CreateDCW(szDisplayW, NULL, NULL, NULL);
|
||||||
if (hDC)
|
if (hDC)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue