* :--------------------------------------- * ------------------------: Print Screen API - Function * :--------------------------------------- * : * : This copybook is used to print a * : screen to any windows printer. * : You must pass in the hwnd if the * : panel and the printer name. * : * : You may either supply the Printer name * : or let the API prompt for it with the * : standard windows Print Dialog box. * : (If forcing this API to run on the * : server you MUST supply printer name). * : * : You can supply printer setup via Two * : means. * : 1) By setting 88s in GS-DEVMODE-DATA * : (or supplying GS-DEVMODE-DATA from * : a previous call, or leaving it * : all low-values to accept user's * : default settings * : OR * : 2) Leave GS-DEVMODE-DATA as low values * : and also leave the printer name * : low-values and user choices will be * : use from printer selection dialog. * : * : This API may not be forced to run on * : the server side when operating under * : the client server. * To use: * * COPY WIN32API. * COPY PRTSCRN. * COPY GSPRTDEF. * * : Typical call * : (Shows printer selection dialog) * SET PRTSCRN-PARMS-INITIALIZE TO TRUE. * * SET FUNC-PRINTSCREEN TO TRUE * CALL 'GSWINAPI' USING WIN32API-PARMS * PRTSCRN-PARMS * GS-DEVMODE-DATA * WIN32API-C * WIN32API-D * WIN32API-E * WIN32API-F. * * IF WIN32API-FAILED * do print-not-possible-or-canceled * ELSE * continue printing report * * ---------------------------------------------------------------- * : If you leave the printer name blank * : and put in a panel-HWND the print file * : api will prompt the user for the * : printer name. 01 PRTSCRN-PARMS. * : Don't use this everytime unless you * : want to select a printer each time. 88 PRTSCRN-PARMS-INITIALIZE VALUE LOW-VALUES. 05 PRTSCRN-PRINTER-NAME PIC X(100) VALUE LOW-VALUE. * : REQUIRED: the hwnd of the screen * : to be printed 05 PRTSCRN-WINDOW-HWND PIC X(4). 05 PRTSCRN-OPTION-SCREEN PIC X VALUE LOW-VALUE. * : Entire panel, title bar, and statusbar 88 PRTSCRN-OS-ENTIRE-PANEL VALUE LOW-VALUES. * : Don't want the title bar 88 PRTSCRN-OS-PANEL-CLIENT-AREA VALUE '1'. * : Print Entire Desktop 88 PRTSCRN-OS-ENTIRE-DESKTOP VALUE '0'. 88 PRTSCRN-OS-ENTIRE-DESKTOP-HI VALUE 'H'. 05 PRTSCRN-COMPATIBILITY-MODE PIC X VALUE LOW-VALUE. 88 PRTSCRN-COMPAT-DEFAULT VALUE LOW-VALUES. * : Set this if your printer prints a * : corrupt image. Usually only happens * : with a modern printer on win9x. * : Use selectivly, perhaps via a user * : setting or environmental. 88 PRTSCRN-COMPAT-OLDDRIVER VALUE '1'. * : Not used at this time. 05 PRTSCRN-FUTURE-OPTION PIC X VALUE LOW-VALUE.