Author: jimtabor
Date: Tue Nov 28 01:04:17 2006
New Revision: 24906
URL:
http://svn.reactos.org/svn/reactos?rev=24906&view=rev
Log:
Fixup example code and add the new helper function.
Modified:
trunk/reactos/dll/win32/gdi32/objects/painting.c
Modified: trunk/reactos/dll/win32/gdi32/objects/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pa…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/painting.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/painting.c Tue Nov 28 01:04:17 2006
@@ -26,13 +26,10 @@
return MFDRV_MetaParam8( hDC, META_ARC, a1, a2, a3, a4, a5, a6, a7, a8)
else
{
- PDC_ATTR Dc_Attr;
- PLDC pLDC;
- GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr);
- pLDC = Dc_Attr->pvLDC;
+ PLDC pLDC = GdiGetLDC(HDC hDC);
if ( !pLDC )
{
- SetLastError(ERROR_INVALID_HANDLE)
+ SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
@@ -72,13 +69,10 @@
return FALSE; //No meta support for ArcTo
else
{
- PDC_ATTR Dc_Attr;
- PLDC pLDC;
- GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr);
- pLDC = Dc_Attr->pvLDC;
+ PLDC pLDC = GdiGetLDC(HDC hDC);
if ( !pLDC )
{
- SetLastError(ERROR_INVALID_HANDLE)
+ SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
@@ -117,13 +111,10 @@
return MFDRV_MetaParam8( hDC, META_CHORD, a1, a2, a3, a4, a5, a6, a7, a8)
else
{
- PDC_ATTR Dc_Attr;
- PLDC pLDC;
- GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr);
- pLDC = Dc_Attr->pvLDC;
+ PLDC pLDC = GdiGetLDC(HDC hDC);
if ( !pLDC )
{
- SetLastError(ERROR_INVALID_HANDLE)
+ SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
@@ -162,13 +153,10 @@
return MFDRV_MetaParam8( hDC, META_PIE, a1, a2, a3, a4, a5, a6, a7, a8)
else
{
- PDC_ATTR Dc_Attr;
- PLDC pLDC;
- GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr);
- pLDC = Dc_Attr->pvLDC;
+ PLDC pLDC = GdiGetLDC(HDC hDC);
if ( !pLDC )
{
- SetLastError(ERROR_INVALID_HANDLE)
+ SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)