Re: Win32 questions--- + Win32Lib qs
Mike Hurley wondered:
> Does the new Win32Lib have printing in it?
No, not yet. I was hoping to get Llama released a month ago (it has weak
printing support), but that didn't happen. Perhaps I'll go and patch
Win32Lib to support printing in the mean time.
> When printing, can you tell Windows what font to use?
Yes. Basically, just about any graphic command you can use on the screen can
be used with a printer.
> I also noticed that it uses winspool.dll ...
I call winspool.drv; I *think* that's in NT.
In order to add printing in Win32Lib, I'd probably create a default device
called Printer. The main code changes would be to getDC() and releaseDC(),
which would have to return the DC from SelectPrinter. Printing might look
something like this:
-- select the printer. this ensures that Printer has
-- a DC in it from SelectPrinter.
if choosePrinter() then
-- start of document
startDoc()
-- start of page
startPage()
-- print something
selectFont( Printer, "New Century Schoolbook", 12, Bold )
moveTo( Printer, 1, 1 )
wPuts( Printer, "Hello, World!" )
-- end of page
endPage()
-- end of document
endDoc()
end if
As usual, I'm in the middle of a couple of other projects at the moment.
-- David Cuny
|
Not Categorized, Please Help
|
|