This operation code calls the standard Windows Setup Printer dialog box and utilizes the margins specified in the dialog box. This allows the user to select which printer to use, the desired page orientation, the margins, and the desired paper size and source.
CALL "WIN$PRINTER" USING WINPRINT-SETUP-USE-MARGINS GIVING RESULT
The WINPRINT-SETUP-USE-MARGINS operation code is similar to WINPRINT-SETUP in its base usage.
If you are using the WINPRINT-SELECTION data structure (like WINPRINT-SETUP), it must be followed by a call to WINPRINT-GET-CURRENT-INFO(-EX) to ensure consistency between COBOL data storage information and the current Windows configuration. However, if you do not use any of the operation codes that rely on the WINPRINT-SELECTION group, there is no need to call WINPRINT-GET-CURRENT-INFO(-EX).
WINPRINT-SETUP-USE-MARGINS is defined in winprint.def. You can use this operation code with WINPRINT-GET-MARGINS to obtain the current margin.