Re: "Printing/grabbing window contents"

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

don cole wrote:
> 
> 
> Recently some people were commenting on this subject.
> I got how to save your "Print Preview" window to a bitmap with win32dib.
> 
> But how can I print the bitmap to my printer from within my Euphoria
> Program without exiting
> and going onto the Bmp program?

Because the screen and printer have different sized pixels, you will
need to resize your bitmap for printing.

First, calculate the screen bitmap's physical width and height. Use the
GetDeviceCaps API with the LOGPIXELSX and LOGPIXELSY parameters.
Then calculate the number of horizontal and vertical printer pixels
this would need for the same physical size.
Finally, use the StretchBlit routine to copy and resize the screen
bitmap to the printer.

-- 
Derek Parnell
Melbourne, Australia

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

Search



Quick Links

User menu

Not signed in.

Misc Menu