1. Printing a bitmap in Windows

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

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu