1. Please Help - Printing a BMP from EXW
WinCode Gurus,
I would like to print a BMP file from a windows EUPHORIA application. How
would I do this?
Thanks in advance!
ck
2. Re: Please Help - Printing a BMP from EXW
ck wrote:
> I would like to print a BMP file from a
> windows EUPHORIA application. How would
> I do this?
If you are using Win32Lib, you should be able to BitBlt or CopyBlt it to the
printer. Something like this:
-- warning: untested code!
include win32lib.ew
integer ignore
-- load the bitmap
constant theBitmap = loadBitmapFromFile("test.bmp")
-- set up the printer to print a page
ignore = getPrinter()
ignore = startDoc( "Print Bitmap")
ignore = startPage()
-- send the bitmap to the page
copyBlt( Printer, 10, 10, theBitmap )
-- print the document
ignore = endPage()
ignore = endDoc()
releasePrinter()
Hope this helps!
-- David Cuny
3. Re: Please Help - Printing a BMP from EXW
David,
Thanks! Here's some issues with it:
type_check failure, ignore is {1,999,1}
So I changed ignore to an object type.
Then I got a "bitBlt: bitBlt failed" message. However, the graphic printed.
I appreciate your help in this regard. If you've got answers for the above,
please let me know.
Thanks!
ck
----- Original Message -----
From: Cuny, David at DSS <David.Cuny at DSS.CA.GOV>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Tuesday, June 06, 2000 11:19 AM
Subject: Re: Please Help - Printing a BMP from EXW
>
>
> ck wrote:
>
> > I would like to print a BMP file from a
> > windows EUPHORIA application. How would
> > I do this?
>
> If you are using Win32Lib, you should be able to BitBlt or CopyBlt it to
the
> printer. Something like this:
>
> -- warning: untested code!
> include win32lib.ew
>
> integer ignore
>
> -- load the bitmap
> constant theBitmap = loadBitmapFromFile("test.bmp")
>
> -- set up the printer to print a page
> ignore = getPrinter()
> ignore = startDoc( "Print Bitmap")
> ignore = startPage()
>
> -- send the bitmap to the page
> copyBlt( Printer, 10, 10, theBitmap )
>
> -- print the document
> ignore = endPage()
> ignore = endDoc()
> releasePrinter()
>
> Hope this helps!
>
> -- David Cuny
>
4. Re: Please Help - Printing a BMP from EXW
Try this 'totally' weird example.
Wolf
http://www.king.igs.net/~wolfritz/bits8.zip
----------
> From: cklester <cklester at HOTPOP.COM>
> To: EUPHORIA at LISTSERV.MUOHIO.EDU
> Subject: Please Help - Printing a BMP from EXW
> Date: Tuesday, June 06, 2000 11:17 AM
>
> WinCode Gurus,
>
> I would like to print a BMP file from a windows EUPHORIA application. How
> would I do this?
>
> Thanks in advance!
> ck