1. RE: Printer Dialog Box

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/
> 
>

new topic     » topic index » view message » categorize

2. RE: Printer Dialog Box

... a bit of 'hacking' here  blink

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

new topic     » goto parent     » topic index » view message » categorize

3. RE: Printer Dialog Box

Thanks again Wolf.  It works great!  

Virtual B


Wolf wrote:
> ... a bit of 'hacking' here  blink
> 
> 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
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu