If I decide to do a graphics print, then I select a menu item that has a double-callback starting with 'GPRINTER_OPEN' and then going on to my routine that does all the graphics. In that routine, if I decide to abort the printing process, I can use:
CALL GET_CURRENT_DC@ (iHDC)
CALL CLOSE_PRINTER_ONLY@(iHDC)
with GET_CURRENT_DC@ only necessary because it is a way to find the the gprinter handle.
By the same logic, I have elsewhere a choice to print tabulated results, where the menu item selects 'PRINTER_OPEN', then the fortran unit number, and then the routine that does the printing. However, if in the middle of this I decide I don't really want the print, what do I do to cancel it?
There's no point in calling CALL GET_CURRENT_DC@ (iHDC), because that returns the handle of the graphics area on the screen (in my case). It did occur to me that like CLOSE_PRINTER@, giving a handle of 0 to CLOSE_PRINTER_ONLY@ might terminate the printer without output, but it doesn't, and when the program exits, a blank sheet of paper is ejected.
I also tried STATUS='DELETE' on a Fortran CLOSE statement, but that had the effect of making the blank sheet eject immediately.
This is purely cosmetic, because in 99% of runs, no tabulated output is called for, and in 99% of the remaining 1%, the printing isn't aborted.
Does anyone know?
Eddie