1. "Printing/grabbing window contents"
- Posted by don cole <doncole at pacbell.net> Jun 11, 2004
- 413 views
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?
2. Re: "Printing/grabbing window contents"
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 11, 2004
- 421 views
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
3. Re: "Printing/grabbing window contents"
- Posted by don cole <doncole at pacbell.net> Jun 11, 2004
- 406 views
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" ) ?
4. Re: "Printing/grabbing window contents"
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 11, 2004
- 445 views
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
5. Re: "Printing/grabbing window contents"
- Posted by "Unkmar" <L3Euphoria at bellsouth.net> Jun 11, 2004
- 402 views
----- Original Message ----- From: "Derek Parnell" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Friday, June 11, 2004 2:30 AM Subject: Re: "Printing/grabbing window contents" > > > posted by: Derek Parnell <ddparnell at bigpond.com> > > 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 > Why does that look too easy? oh well, I guess I like a hard life. unkmar PS: Just running my ratchet jaw cause it ain't wired shut.