RE: Printer Dialog Box
- Posted by Virtual B <behaviorself at netzero.net> Sep 25, 2001
- 391 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 > >