Printing a Bitmap (Win32lib)

new topic     » topic index » view thread      » older message » newer message

I asked for help on this a bit ago.... no answer... is there really
no-one there who can help?

I'm trying to print a bitmap from a windows program.  Here's the code:

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

This should load a  bitmap, then print it: in fact what happens is that
I get an error message telling me bitblt failed. If I tell it to
continue anyway, I get a solid black square printed - it's the size of
the bitmap in question but the bitmap isn't plain black!

What's wrong?  I've tried looking back through the mailing list archive
but there doesn't seem to be a solution there....

-- 
------------------                          -------------------------
|\avid Aldred   /  David at aldred.demon.co.uk  \   Nottingham, England
|/             --------------------------------

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu