[comp.windows.ms] Printing Generic

chw@prism.TMC.COM (08/18/89)

    Has anyone written Windows code that prints to generic tty printers?

    Our application knows how to print to IBMGRX graphics printers using the
Windows Escape() calls, but fails when making the same calls to a Brother
HR-40 daisywheel printer configured with tty.drv.  I know the Brother's 
configuration is correct since I print on it successfully from MS Write. 
None of the Escape() calls abort and I do TextOut()s with a valid HDC, 
but the only output I get is a formfeed.  What's wrong here?  Thanks for 
any suggestions. 

	----
	Christopher H. Wilbur   chw@mirror.TMC.COM
		       {mit-eddie, ihnp4, wjh12, cca, cbosgd, seismo}!mirror!chw
	Mirror Systems	2067 Massachusetts Avenue  Cambridge, MA  02140
	Telephone:	617-661-0777			

bturner@hpcvlx.HP.COM (Bill Turner) (08/22/89)

>    Has anyone written Windows code that prints to generic tty printers?
>
>    Our application knows how to print to IBMGRX graphics printers using the
>Windows Escape() calls, but fails when making the same calls to a Brother
>HR-40 daisywheel printer configured with tty.drv.  I know the Brother's 
>configuration is correct since I print on it successfully from MS Write. 
>None of the Escape() calls abort and I do TextOut()s with a valid HDC, 
>but the only output I get is a formfeed.  What's wrong here?  Thanks for 
>any suggestions. 

Are you doing an Escape(NEWFRAME) before you do Escape(ENDDOC)?  If not,
the print driver won't output the current page.

Basic algorithm:

    Escape(SETABORTPROC)
    Escape(STARTDOC)
       print whatever
    Escape(NEWFRAME)
    [Repeat print and Escape(NEWFRAME) for each page]
    Escape(ENDDOC)
    

--Bill Turner (bturner@hp-pcd.hp.com)
HP Corvallis Information Systems