mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 05:41:58 +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' };
|
||||
HENHMETAFILE hEMF;
|
||||
PENHMETAHEADER pemh = (PENHMETAHEADER)Buffer;
|
||||
|
||||
pInfo->mm = MM_ANISOTROPIC;
|
||||
pInfo->xExt = pemh->rclFrame.right - pemh->rclFrame.left; // Width
|
||||
pInfo->yExt = pemh->rclFrame.bottom - pemh->rclFrame.top; // Height
|
||||
ENHMETAHEADER emh;
|
||||
|
||||
hEMF = SetEnhMetaFileBits(nSize, Buffer);
|
||||
if (hEMF == NULL)
|
||||
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);
|
||||
if (hDC)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue