The GdiGetDevmodeForPage function returns DEVMODEW structures for the specified and previous pages of a print job.
BOOL GdiGetDevmodeForPage( HANDLE SpoolFileHandle, DWORD dwPageNumber, PDEVMODEW *pCurrDM, PDEVMODEW *pLastDM );
Caller-supplied spool file handle, obtained by a previous call to GdiGetSpoolFileHandle.
Caller-supplied number of the page for which DEVMODEW contents are to be returned.
Caller-supplied location to receive a pointer to a DEVMODE structure for the page specified by dwPageNumber.
Caller-supplied location to receive a pointer to a DEVMODE structure for the page previous to the one specified by dwPageNumber.
If the operation succeeds, the function returns TRUE. Otherwise it returns FALSE.
The GdiGetDevmodeForPage function is exported by gdi32.dll for use within a print processor's PrintDocumentOnPrintProcessor function.
Before calling GdiPlayPageEMF to execute a page's EMF instructions, a print processor must call GdiGetDevmodeForPage to determine if the DEVMODE structure associated with the page to be printed is the same as that of the last page printed. If the two returned DEVMODE structures are not identical, the print processor must perform the following steps, in order, before calling GdiPlayPageEMF for the page:
- Call GdiEndPageEMF.
- Call GdiResetDCEMF, specifying the DEVMODE pointed to by pCurrDM.
- Call GdiStartPageEMF.
|Header||winppi.h (include Winppi.h)|