mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
- Update CancelDC and DrawEscape.
svn path=/trunk/; revision=40621
This commit is contained in:
parent
b32a91734c
commit
087ad5b15d
1 changed files with 47 additions and 8 deletions
|
@ -72,29 +72,68 @@ SaveDC(IN HDC hdc)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL
|
BOOL
|
||||||
WINAPI
|
WINAPI
|
||||||
CancelDC(HDC hdc)
|
CancelDC(HDC hDC)
|
||||||
{
|
{
|
||||||
/* FIXME Sharememory */
|
PDC_ATTR pDc_Attr;
|
||||||
return NtGdiCancelDC(hdc);
|
|
||||||
|
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC &&
|
||||||
|
GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC )
|
||||||
|
{
|
||||||
|
PLDC pLDC = GdiGetLDC(hDC);
|
||||||
|
if ( !pLDC )
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
/* If a document has started set it to die. */
|
||||||
|
if (pLDC->Flags & LDC_INIT_DOCUMENT) pLDC->Flags |= LDC_KILL_DOCUMENT;
|
||||||
|
|
||||||
|
return NtGdiCancelDC(hDC);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &pDc_Attr))
|
||||||
|
{
|
||||||
|
pDc_Attr->ulDirty_ &= ~DC_PLAYMETAFILE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
WINAPI
|
WINAPI
|
||||||
DrawEscape(HDC hdc,
|
DrawEscape(HDC hDC,
|
||||||
INT nEscape,
|
INT nEscape,
|
||||||
INT cbInput,
|
INT cbInput,
|
||||||
LPCSTR lpszInData)
|
LPCSTR lpszInData)
|
||||||
{
|
{
|
||||||
/* FIXME Sharememory */
|
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)
|
||||||
return NtGdiDrawEscape(hdc, nEscape, cbInput, (LPSTR) lpszInData);
|
return NtGdiDrawEscape(hDC, nEscape, cbInput, (LPSTR) lpszInData);
|
||||||
|
|
||||||
|
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC)
|
||||||
|
{
|
||||||
|
PLDC pLDC = GdiGetLDC(hDC);
|
||||||
|
if ( pLDC )
|
||||||
|
{
|
||||||
|
if (pLDC->Flags & LDC_META_PRINT)
|
||||||
|
{
|
||||||
|
// if (nEscape != 8)
|
||||||
|
// return EMFDRV_WriteEscape(hDC, nEscape, cbInput, lpszInData, EMR_DRAWESCAPE);
|
||||||
|
|
||||||
|
return NtGdiDrawEscape(hDC, nEscape, cbInput, (LPSTR) lpszInData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue