mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[GDI32]
Fix SetWindowExtEx to pass all tests svn path=/trunk/; revision=56424
This commit is contained in:
parent
e28f37f061
commit
05599f98f0
1 changed files with 29 additions and 24 deletions
|
@ -483,38 +483,42 @@ SetWindowOrgEx(HDC hdc,
|
||||||
*/
|
*/
|
||||||
BOOL
|
BOOL
|
||||||
WINAPI
|
WINAPI
|
||||||
SetWindowExtEx(HDC hdc,
|
SetWindowExtEx(
|
||||||
int nXExtent,
|
_In_ HDC hdc,
|
||||||
int nYExtent,
|
_In_ INT nXExtent,
|
||||||
LPSIZE lpSize)
|
_In_ INT nYExtent,
|
||||||
|
_Out_opt_ LPSIZE lpSize)
|
||||||
{
|
{
|
||||||
PDC_ATTR pdcattr;
|
PDC_ATTR pdcattr;
|
||||||
|
ULONG ulType;
|
||||||
|
|
||||||
#if 0
|
/* Check what type of DC that is */
|
||||||
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
|
ulType = GDI_HANDLE_GET_TYPE(hdc);
|
||||||
|
switch (ulType)
|
||||||
{
|
{
|
||||||
if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
|
case GDILoObjType_LO_DC_TYPE:
|
||||||
return MFDRV_SetWindowExtEx();
|
/* Handle this in the path below */
|
||||||
else
|
break;
|
||||||
{
|
#if 0// FIXME: we don't support this
|
||||||
PLDC pLDC = GdiGetLDC(hdc);
|
case GDILoObjType_LO_METADC16_TYPE:
|
||||||
if ( !pLDC )
|
return MFDRV_SetWindowExtEx(hdc, nXExtent, nYExtent, lpSize);
|
||||||
{
|
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
case GDILoObjType_LO_METAFILE_TYPE:
|
||||||
return FALSE;
|
return EMFDRV_SetWindowExtEx(hdc, nXExtent, nYExtent, lpSize);
|
||||||
}
|
|
||||||
if (pLDC->iType == LDC_EMFLDC)
|
|
||||||
{
|
|
||||||
return EMFDRV_SetWindowExtEx();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
default:
|
||||||
|
/* Other types are not allowed */
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the DC attr */
|
||||||
pdcattr = GdiGetDcAttr(hdc);
|
pdcattr = GdiGetDcAttr(hdc);
|
||||||
if (!pdcattr)
|
if (!pdcattr)
|
||||||
{
|
{
|
||||||
|
/* Set the error value and return failure */
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lpSize)
|
if (lpSize)
|
||||||
|
@ -549,7 +553,8 @@ SetWindowExtEx(HDC hdc,
|
||||||
if (pdcattr->dwLayout & LAYOUT_RTL) NtGdiMirrorWindowOrg(hdc);
|
if (pdcattr->dwLayout & LAYOUT_RTL) NtGdiMirrorWindowOrg(hdc);
|
||||||
pdcattr->flXform |= (PAGE_EXTENTS_CHANGED|INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID);
|
pdcattr->flXform |= (PAGE_EXTENTS_CHANGED|INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID);
|
||||||
}
|
}
|
||||||
return TRUE; // Return TRUE.
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue