1. RE: Print preview?

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C20C0F.A6DD7810
 charset=iso-8859-1

No. Any ideas how to do this?

> -----Original Message-----
> From: Evan Marshall [mailto:evan at net-link.net]
> Sent: Wednesday, 5 June 2002 3:16
> To: EUforum
> Subject: Print preview?
> 
> 
> 
> Is there a "print preview" function available in win32lib?
> 
> 
> 
> 

==================================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
==================================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


==================================================================

------_=_NextPart_000_01C20C0F.A6DD7810
Content-Type: application/ms-tnef

new topic     » topic index » view message » categorize

2. RE: Print preview?

In the minimal research I've done, it looks like .NET might have some 
routines for doing print previews but I don't think you want to go 
there...

-- Brian

Derek Parnell wrote:
> No. Any ideas how to do this?
> 
> > -----Original Message-----
> > From: Evan Marshall [mailto:evan at net-link.net]
> > Sent: Wednesday, 5 June 2002 3:16
> > To: EUforum
> > Subject: Print preview?
> > 
> > 
> > 
> > Is there a "print preview" function available in win32lib?
> > 
> > 
> > 
> ==================================================================
> 
> 
> ==================================================================
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

3. RE: Print preview?

Derek Parnell wrote:
> No. Any ideas how to do this?

Because we have no way of using MFC,
then you need to go back to older versions of windows.
Heres a simple way to start.
Go here and download sample repmkr.exe
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q69078
This may give someone ideas about doing it in euphoria.


Bernie

new topic     » goto parent     » topic index » view message » categorize

4. RE: Print preview?

Be sure to use the whole link in my last post because
Topica doesn't like semicolons in links.

Bernie

new topic     » goto parent     » topic index » view message » categorize

5. RE: Print preview?

> -----Original Message-----
> From: euman at bellsouth.net [mailto:euman at bellsouth.net]

> I presented a small demo last week :
> [ Final: Code (using Win32lib) that doesnt seem to work proper ]
> you could in theory xSetViewportExtEx on a Richedit control Window
> and reduce it to the size of one page but this would require 
> some trickery.
> 
> I have seen the C++ code to do exactly what you're after but 
> I cant remember where.

I've never tried to do any printing, but don't you have to draw everything
to the printer like you would to the screen?  Couldn't you do this to a
pixmap and blit it over?

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

6. RE: Print preview?

I don't see why you couldn't do this.  You could have multiple pixmaps, and
use StretchBlt instead of BitBlt.  Note that this isn't wrapped in Win32lib,
but a cursory glance tells me you could probably just copy the bitBlt
routine, changing the C-call to xStretchBlt to resize the image.  For more
info on StretchBlt:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps
_9cok.asp

Matt Lewis

-----Original Message-----
From: Evan Marshall [mailto:evan at net-link.net]

I was kind of looking for something similar to the print preview found in
most word processing type programs.  A button for "Print", "Next Page",
"Prev Page", "Zoom In", "Zoom Out", and "Close" and maybe one to let you
view one or two pages at a time.

new topic     » goto parent     » topic index » view message » categorize

7. RE: Print preview?

Matthew Lewis wrote:
> 
> I don't see why you couldn't do this.  You could have multiple pixmaps, 
> and
> use StretchBlt instead of BitBlt.  Note that this isn't wrapped in 
> Win32lib,
> but a cursory glance tells me you could probably just copy the bitBlt
> routine, changing the C-call to xStretchBlt to resize the image.  For 
> more
> info on StretchBlt:
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps
> 
> _9cok.asp
> 
Matt:
   I don't think it would be that simple.
   You would have to create a bmp in memory the same size
   as piece of paper and draw everything on it that
   would appear on the printed page. Then you would have to
   scale all the pixels to display them properly
   on the screen.
   Yipes !
   Good Luck.


Bernie

new topic     » goto parent     » topic index » view message » categorize

8. RE: Print preview?

> -----Original Message-----
> From: Bernie Ryan [mailto:xotron at localnet.com]

>   I don't think it would be that simple.
>   You would have to create a bmp in memory the same size
>   as piece of paper and draw everything on it that
>   would appear on the printed page. Then you would have to
>   scale all the pixels to display them properly
>   on the screen.

I think you should already have those things if you're going to be printing.
Looking at Irv's report printer for win32lib (usingprinter.zip in the
archives):

------------------------------------------------------------
-- use Win32Lib routines to determine size of font and page
-----------------------------------------------------------
 result = getFontSize(Printer)   -- returns font {width, height}
 fontY = result[2]
 result = getSize(Printer)  -- returns page {width, height}
 pageY = result[4]
 posY  = 0   -- set current print position to top

So you use getSize() to figure how big your pixmap should be, same as you
probably already figured out for the print routine.  The bitmap doesn't need
to be the same size, just proportionate, so that when its stretched, it
looks right.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

9. RE: Print preview?

petelomax at blueyonder.co.uk wrote:
> On Tue, 4 Jun 2002 22:10:21 -0500, euman at bellsouth.net wrote:
> 
> >I have seen the C++ code to do exactly what you're after but I cant 
> >remember where.
> 
> Was this it?
> http://www.codeguru.com/printing/PrintPreviewWithoutMfc.shtml
> 
Looks good Pete:
  Yes that might work, that is the way Matt was suggesting
  to do it. Using a DLL would allow using the MFC which is
  overkill but this way   probably could be done with just
  Euphoria and put in the Win32lib.
Bernie

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu