Add Region object types and one Dc that was missed. Thanks Thomas!

svn path=/trunk/; revision=30897
This commit is contained in:
James Tabor 2007-11-29 13:07:38 +00:00
parent 83c857dfd3
commit 7cfe53d57d
2 changed files with 3 additions and 4 deletions

View file

@ -31,7 +31,7 @@ HDC WINAPI CreateEnhMetaFileW(
mDC = NtGdiCreateMetafileDC( hDC ); // Basically changes the handle from 1xxxx to 46xxxx.
// If hDC == NULL, works just like createdc in win32k.
if ( !GdiGetHandleUserData((HGDIOBJ) mDC, (PVOID) &Dc_Attr))
if ( !GdiGetHandleUserData((HGDIOBJ) mDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr))
{
SetLastError (ERROR_INVALID_PARAMETER);
return NULL; // need to delete the handle?

View file

@ -87,7 +87,7 @@ DeleteRegion( HRGN hRgn )
#if 0
PREGION_ATTR Rgn_Attr;
if ((GdiGetHandleUserData((HGDIOBJ) hRgn, (PVOID) &Rgn_Attr)) &&
if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
( Rgn_Attr != NULL ))
{
PTEB pTeb = NtCurrentTeb();
@ -151,8 +151,7 @@ SetRectRgn(HRGN hrgn,
#if 0
PREGION_ATTR Rgn_Attr;
if (!(GdiGetHandleUserData((HGDIOBJ) hrgn, (PVOID) &Rgn_Attr)) ||
(GDI_HANDLE_GET_TYPE(hrgn) != GDI_OBJECT_TYPE_REGION))
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
#endif
return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
#if 0