I saw that after my last post, but the question becomes, how is it passed ?
C is not my strength ... but is PRNDUPLEX( 2 ) really passing the specific value correctly ?
Enrico Maria Giordano wrote:TimStone wrote:Note that is does not take the value passed.
Yes, it does:
- Code: Select all Expand view RUN
lpDevMode->dmDuplex = hb_parni( 1 );
Or am I missing something?
nPrevMode := PRNDUPLEX( nNewMode )
/* duplex enable */
#define DMDUP_SIMPLEX 1
#define DMDUP_VERTICAL 2
#define DMDUP_HORIZONTAL 3
// Present the print selection option window and find the type
nPrnOpt := PRNSEL()
IF nPrnOpt = 0 // If Exit is specified, leave the print report function
RETURN NIL
ENDIF
// Now tell the print engine the type of format to use
IF nPrnOpt = 1
PRINT oPrn NAME "Workorder Printing" PREVIEW FROM USER MODAL // Preview with alternate printer selection
ELSEIF nPrnOpt = 2
PRINT oPrn NAME "Workorder Printing" PREVIEW MODAL // Preview with default printer
ELSEIF nPrnOpt = 3
PRINT oPrn NAME "Workorder Printing" FROM USER // Send to user selected printer
ELSEIF nPrnOpt = 4
PRINT oPrn NAME "Workorder Printing" // Send to default printer
ENDIF
// ????????? HERE ??????????
PRNDUPLEX( 2 )
// Define the brush
// Set the resolution divided by the standard 8.5x11 inch paper rows/columns
nRsp := oPrn:nVertRes() / 68 // Number of rows
nCsp := oPrn:nHorzRes() / 85 // Number of columns
// Now send the number of copies to the printer
oPrn:SetCopies( nPrnCopies )
// Turn on the first page - print the header data
PAGE
WOHEADER( oPrn, aHead )
....
// End of print
ENDPAGE
oPrn:SetCopies( 1 )
ENDPRINT
PRINT ....
// Anywhere between PRINT between ENDPRINT
nSaveDuplex := PRNDUPLEX( 2 or 3 )
// ...
// ...
ENDPRINT
PRNDUPLEX( nSaveDuplex )
That is what I’vve done so I will leave it in. The output is wrong on my printer but hopefully client printers will be good. Thank you
if ISDUPLEXPRINTER()
PRNDUPLEX( n )
endif
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 85 guests