aking@bbn.com (Allen King) (04/09/91)
I've written a program which uses GEM windows, and I would like to add printer capability to it. The simple thing of "print screen" lacks the resolution I need. How do you change such a program to redirect its output to the printer rather than the screen? I've scanned the developer's docs and Lasar C manual and nothing's popped out at me. I suspect I should open a virtual workstation as a printer class device rather or metafile than a CRT screen, and then install GDOS and the appropriate printer driver. However calling open_vwork with a class of printer=21 have not moved the the output of my program from the screen, as I suspected it would. Thanks Allen King aking@pebbles.bbn.com
bjoern@drdhh.hanse.de (Bjoern Kriews) (04/12/91)
From article <63607@bbn.BBN.COM>, by aking@bbn.com (Allen King): > > I've written a program which uses GEM windows, and I would like to > add printer capability to it. The simple thing of "print screen" lacks > the resolution I need. How do you change such a program to redirect > its output to the printer rather than the screen? Install GDOS & a printer driver, using device id 21 + fonts. Then the following piece of source should bring what you expect: int h,i; int in[11],out[57]; int p[10]; appl_init(); in[0]=21; /* DEVICE ID */ for(i=1;i<10;in[i++]=1); in[10]=0; /* NDC */ v_opnwk(in,&h,out); /* NOT VIRTUAL !!! */ if(!h) { printf("h: %d, couldn't open\n",h); appl_exit(); exit(1); } v_arc(h,5000,5000,2000,0,900); v_clswk(h); appl_exit(); exit(0); Hope that helps, Bjoern --- bjoern@drdhh.hanse.de = Bjoern Kriews / Stormsweg 6 / 2000 Hamburg 76 / FRG "gaaga mahwe Bjoern urgl ufzae Turbo-C bnub" (J. Willamowius)