Re: "Printing/grabbing window contents"

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

don cole wrote:
> 
> 
> Derek Parnell wrote:
> > 
> > 
> > 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
> > 
> Thank you for your reply.
> I will study that but for now what I want know is how to get the BMP
> to the Printer in any size.
> Do I use something like
>          setPenPosition( Printer, 0, y )
>         wPuts( Printer, "myPix.bmp" )
> ?

  atom bmp
  bmp = loadBitmapFromFile("myPix.bmp")
  copyBlt(Printer, x, y, bmp)
  delete(bmp)


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