diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index f175d8f59bc..0f01e28696d 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -1821,6 +1821,18 @@ BOOL WINAPI CancelDC(HDC hdc) return TRUE; } +/********************************************************************** + * SetAbortProc (GDI32.@) + */ +INT WINAPI SetAbortProc( HDC hdc, ABORTPROC abrtprc ) +{ + DC_ATTR *dc_attr; + + if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + dc_attr->abort_proc = abrtprc; + return TRUE; +} + /*********************************************************************** * SetICMMode (GDI32.@) */ diff --git a/dlls/gdi32/ntgdi_private.h b/dlls/gdi32/ntgdi_private.h index 6701385784f..c2e45ab7ce0 100644 --- a/dlls/gdi32/ntgdi_private.h +++ b/dlls/gdi32/ntgdi_private.h @@ -101,7 +101,6 @@ typedef struct tagDC INT breakExtra; /* breakTotalExtra / breakCount */ INT breakRem; /* breakTotalExtra % breakCount */ - ABORTPROC pAbortProc; /* AbortProc for Printing */ XFORM xformWorld2Wnd; /* World-to-window transformation */ XFORM xformWorld2Vport; /* World-to-viewport transformation */ XFORM xformVport2World; /* Inverse of the above transformation */ diff --git a/dlls/gdi32/printdrv.c b/dlls/gdi32/printdrv.c index c4fcf8ada13..ee8ae295daf 100644 --- a/dlls/gdi32/printdrv.c +++ b/dlls/gdi32/printdrv.c @@ -76,7 +76,7 @@ INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc) if(!dc) return SP_ERROR; - if (dc->pAbortProc && !dc->pAbortProc( hdc, 0 )) ret = 0; + if (dc->attr->abort_proc && !dc->attr->abort_proc( hdc, 0 )) ret = 0; else { PHYSDEV physdev = GET_DC_PHYSDEV( dc, pStartDoc ); @@ -204,18 +204,3 @@ INT WINAPI AbortDoc(HDC hdc) } return ret; } - - -/********************************************************************** - * SetAbortProc (GDI32.@) - * - */ -INT WINAPI SetAbortProc(HDC hdc, ABORTPROC abrtprc) -{ - DC *dc = get_dc_ptr( hdc ); - - if (!dc) return FALSE; - dc->pAbortProc = abrtprc; - release_dc_ptr( dc ); - return TRUE; -} diff --git a/include/ntgdi.h b/include/ntgdi.h index 061ed40779c..8bff1d4338f 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -169,6 +169,7 @@ typedef struct DC_ATTR UINT font_code_page; RECTL emf_bounds; void *emf; + ABORTPROC abort_proc; /* AbortProc for printing */ } DC_ATTR; struct font_enum_entry