Printing / Print Preview problems

Printing / Print Preview problems

Post by Jim Zur » Wed, 10 May 1995 04:00:00



Hi All,
   I'm having a couple printing problems.

   The first is a general question: why does using Regions to set the
clipping region seem to cause major problems? These include confusing
the MFC Print Preview architecture, and more importantly, causing a loss
of GDI Resources (which are not lost by the same code when drawing
to the screen).

   The second problem concerns Print Preview. My drawing is large
enough to require logical coordinates > 32K, which are too large to
use in calls to SetViewportOrg and IntersectClipRgn. My solution has
been to use OffsetViewportOrg and OffsetClipRgn repeatedly until the
values are < 32K. This seems to work when printing, but not when
Previewing. For instance, if I Offset the clipping region down 5K,
the top 1/3 of the page shows empty, and it will draw below the bottom
of the page.

   Does anyone have any info/answers to these problems? Any and all help
is greatly appreciated.


 
 
 

Printing / Print Preview problems

Post by Chad All » Tue, 16 May 1995 04:00:00


: Hi All,
:    I'm having a couple printing problems.

:    The first is a general question: why does using Regions to set the
: clipping region seem to cause major problems? These include confusing
: the MFC Print Preview architecture, and more importantly, causing a loss
: of GDI Resources (which are not lost by the same code when drawing
: to the screen).

:    The second problem concerns Print Preview. My drawing is large
: enough to require logical coordinates > 32K, which are too large to
: use in calls to SetViewportOrg and IntersectClipRgn. My solution has
: been to use OffsetViewportOrg and OffsetClipRgn repeatedly until the
: values are < 32K. This seems to work when printing, but not when
: Previewing. For instance, if I Offset the clipping region down 5K,
: the top 1/3 of the page shows empty, and it will draw below the bottom
: of the page.

:    Does anyone have any info/answers to these problems? Any and all help
: is greatly appreciated.


I had similiar problems with the use of OffsetViewportOrg or SetViewportOrg
in my case, the only solution I found was to use SetWindowOrg instead.  Why
this helped I really can't remember, but it did.

Chad E Allen

 
 
 

1. Rich Edit Control Printing Problem (like the print preview problem)

Hi,
I've been using the Windows Rich Edit Control to add RTF to some software.
Problem is that when  I print out, what happens is that the text on the
right
can be 'clipped'. I know there is a known problem with print preview with
the RichEdit (problem has been around for a while but 'mysteriously' wasnt
fixed
for windows 98) - and this is like a less dramatic version of the same
problem.
Basically I use the same RichEdit to draw to different areas of the same
page,
by repeatedly loading it with data then FormatRange - ing it to the screen /
printer.

I can't see how its a 'clip rect' thats doing if - what I mean is say I have
a control
containing:
abcdefghijk
abcdefg
abc
.. *every* line (not just the longest one) can be 'unfinished' - bits or
even full
letters can be missing.

Its strange cos sometimes it prints fine, then a subtle change somewhere
can cause the problem to appear just in certain places.
Any suggestions? I've searched the newsgroups for a solution and I couldn't
see it - although the search gave the impression the RichEdit is .. erm ..
not quite as bulletproof and robust as it could be..:)
(I've printed from Windows95 and Windows98 to an HP4000TN, the rich edit is
wrapped using an MFC CRichEditCtrl, compiled using MSVC++ 6)
Thanks in advance,
Brian.

2. Peter de Jager has Quick(en) Solution for Y2K Failure

3. Print and print preview problem (ASSERT error when allocating GDI font resource in OnBeginPrinting)

4. Hattenschweiler in Mac format

5. Automated RTF printing & non-editable print preview

6. Looking for DOS 3.3

7. Printing and Print Preview discrepency

8. TAO_CDR_Encaps_Codec::encode: Possible optimizatio n?

9. Print and Print Preview

10. HELP!!!! MFC PRINT/PRINT PREVIEW

11. Print/Print Preview

12. Print and Print preview

13. printing and print preview