Printing a bitmap in Windows
- Posted by david at aldred.demon.co.uk Jun 09, 2001
- 387 views
I'm trying to get a bitmap printed from Windows. The code is below: what actually happens when I press the print button is: 1. I get an error message saying that bitblt failed. 2. If I tell it to continue anyway, the printer prints a completely black square instead of my bitmap. Can anyone help? The code at present is: procedure PrintButton_onClick () sequence result atom hBitmap result = getPrinter() if length( result ) then if not startDoc( "Trial Bitmap Print") then return end if if not startPage() then return end if hBitmap = loadBitmapFromFile( "c:\\euphoria\\projects\\test.bmp" ) drawBitmap( Printer, hBitmap, 1, 1 ) if not endPage() then return end if if not endDoc() then return end if releasePrinter() end if end procedure -- ------------------ ------------------------- |\avid Aldred / David at aldred.demon.co.uk \ Nottingham, England |/ --------------------------------