PRB: EndPage() Returns -1 When BandingLast reviewed: December 2, 1996Article ID: Q118873 |
The information in this article applies to:
SYMPTOMSWhen an application that implements banding calls EndPage(), EndPage() returns SP_ERROR (-1).
CAUSEEndPage() returns -1 if there has been no corresponding call to StartPage(). Windows keeps track of whether StartPage() has been called by maintaining an internal flag that is set when StartPage() is called and then is cleared when EndPage() is called. This flag is also cleared when the NEXTBAND escape is called and there are no more bands on the page to be printed. At this point, Windows clears the internal flag and tells the device that a page has been finished. Because the internal flag has been cleared, a subsequent call to EndPage() returns -1.
RESOLUTIONThough EndPage() returns -1 when it is called from printing code that implements banding, it does no harm. An application can safely call StartPage() and EndPage() when banding and ignore the -1 error returned from EndPage(). NOTE: It is not recommended that a Win32-based application use banding. Windows NT, spools in a journal file and Windows 95 spools in an enhanced metafile, so all GDI calls are supported without banding.
|
Additional reference words: 3.10 3.50 4.00 NEWFRAME
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |