1. RE: Printer Dialog Box
- Posted by Virtual B <behaviorself at netzero.net> Sep 24, 2001
- 363 views
Thanks Wolf! My program is now printing with no dialog, which is great, but is there a way to change the font? I have to be pretty picky about the way the text looks on this one. I can't seem to find a way to do this with printws.ew, and I've even tried using Win32Lib's setFont. Nothing seems to work. Any ideas? Virtual B Wolf wrote: > I've uploaded two old print demo's that work with win32lib 0.55.1, and > use > winspool.drv, *without* any printer dialogs, printing to the default > printer. If these don't work with WinNT/2000, maybe somebody can let me > know? > > http://www.king.igs.net/~wolfritz/nodialog.zip ( 9k. ) > > Wolf > > -- Arachne V1.66, NON-COMMERCIAL copy, http://arachne.cz/ > >
2. RE: Printer Dialog Box
- Posted by Wolf <wolfritz at KING.IGS.NET> Sep 25, 2001
- 376 views
... a bit of 'hacking' here I fooled around with pr123.exw, *after* making EzCreateFont() global in win32lib. A slight modification to print_stuff() allowed me to specify a different font, but I was surprised to find that I had to re-do this for *every* page. -- modified start to print_stuff() procedure print_stuff(sequence a) --a is filename atom myphdc, i, j, charheight, width, hor, ver sequence mypr, textinfo, string1 atom xhFont,ok mypr=DefaultPrinterName() myphdc=GetPrinterDC(mypr) -- ez_flags (id,hdc,fontname,size*10,0,attributes,0) -- Arial,12,Bold,Italic !!! xhFont=EzCreateFont(0,myphdc,"Arial",120,0,3,0) ok=w32Func(xSelectObject,{myphdc,xhFont}) -- and before each ( next page ) I had to do this again: ok=w32Func(xDeleteObject,{ok}) ok=w32Func(xSelectObject,{myphdc,xhFont}) BTW, as Derek reminded me, this stuff won't work in WinNT/2000, because the flag PRINTER_ENUM_DEFAULT used in printws.ew can NOT be used in this OS. -- reading a Win2000 registry isn't my thing, since I don't have access to one... Wolf
3. RE: Printer Dialog Box
- Posted by Virtual B <behaviorself at netzero.net> Sep 25, 2001
- 390 views
Thanks again Wolf. It works great! Virtual B Wolf wrote: > ... a bit of 'hacking' here > > I fooled around with pr123.exw, *after* making EzCreateFont() global in > win32lib. > A slight modification to print_stuff() allowed me to specify a different > font, but I was surprised to find that I had to re-do this for *every* > page. > > -- modified start to print_stuff() > > procedure print_stuff(sequence a) --a is filename > atom myphdc, i, j, charheight, width, hor, ver > sequence mypr, textinfo, string1 > atom xhFont,ok > mypr=DefaultPrinterName() > myphdc=GetPrinterDC(mypr) > > -- ez_flags (id,hdc,fontname,size*10,0,attributes,0) > -- Arial,12,Bold,Italic !!! > xhFont=EzCreateFont(0,myphdc,"Arial",120,0,3,0) > ok=w32Func(xSelectObject,{myphdc,xhFont}) > > -- and before each ( next page ) I had to do this again: > > > ok=w32Func(xDeleteObject,{ok}) > ok=w32Func(xSelectObject,{myphdc,xhFont}) > > BTW, as Derek reminded me, this stuff won't work in WinNT/2000, because > the > flag PRINTER_ENUM_DEFAULT used in printws.ew can NOT be used in this OS. > -- reading a Win2000 registry isn't my thing, since I don't have access > to > one... > > Wolf > >