The portable layer now prints. Its printers are the CUPS queues that
lpstat lists and "Save as PDF". A printer DC takes its paper, orientation
and resolution from the DEVMODE (300 dpi by default, Letter or A4 by the
locale), with a quarter inch the printer cannot print on, and draws each
page between StartPage and EndPage as a picture. EndPage adds it to a
PDF file (compressed with zlib when the system has it, else run-length
encoded), and EndDoc hands the file to lp, or leaves it where DOCINFO
says, or in ~/Documents. SetAbortProc's procedure runs at each EndPage;
AbortDoc and ResetDC work.
PrintDlg and PageSetupDlg return the default printer's DEVNAMES and
DEVMODE (A and W forms) or show their dialogs: Print, Print Setup and
Page Setup, with the control IDs of a new dlgs.h, hooks, page ranges,
copies, paper, orientation, margins and a sample page.
CommDlgExtendedError reports their errors.
Print preview in sditest and mditest now passes natively; dlgtest,
sditest and mditest join the native test list. wintest prints a job to
a file, checks printer DCs and drives both dialogs through their hooks.
Under Wine 9 the test printer uses the wineps print processor, without
which StartDoc fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
CPreviewDC draws with the printer's DC for layout and the window's for
output, scaled to the page on the screen; CPreviewView shows one or two
pages, zooms, scrolls and pages; the frame hides its menu, bars and main
pane while preview is on. The preview toolbar and the printing dialog
come from the program's resources when it has them (afxprint.rc) and
are built in memory otherwise.
The tests run in a Wine prefix of their own, which gets a PostScript
printer, and the SDI test now previews several pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs