Re: How to print what I have drawn in OnDraw

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Pat Crowe (pcjREMOVE_at_mqp.com)
Date: 05/28/04


Date: Fri, 28 May 2004 15:32:22 +0100

I remember liking the description of how to do this this in Jeff Prosise'
book Programming Windows with MFC 2nd Ed.

"fengxvhui" <anonymous@discussions.microsoft.com> wrote in message
news:BC849B23-471D-4222-A486-55A0772C738C@microsoft.com...
> I have finished drawing something on screen and now I need to draw them on
printer. Since the resolution of printer is far larger than that of screen,
I have to scale the distance in OnDraw.
> From the former post I have known that I need use such functions as
GetDeviceCap, but I can not find a complete and simple instance even I have
searched such websites as codeguru and codeproject.
> What I need is an instance that show me how to get the printer's
resolution, howt to get the paper's size , how to calculate the scale and
how to modify the OnDraw to accustomed itself to display and printing. For
example, in order to fill with the paper, I must create a rectangle in a
proportion to the paper, calculate the scale between screen rectangle and
the paper rectangle and multiply every distance in OnDraw by the scale.
> Thank you!



Relevant Pages

  • Re: Cant get zooming into a selected area to work correctly.
    ... The idea being that the mouse is dragged over an area and the area within the selection rectangle is scaled and then centred to fit in the scrollpane. ... The point passed to that method specifies what point of the contained view will be in the upper-left corner of the viewport, ... It's not just some random method that's used to set the scale for the view. ... private BufferedImage _image; ...
    (comp.lang.java.programmer)
  • Re: A fundamental Doppler-like frequency scaling effect proportional to source distances
    ... The same "grating" is used and detects different red shifts from ... Einstein's notion of scale was based on thinking ... big question was where's this source distance ... signals folks, as mentioned. ...
    (sci.astro)
  • Re: Locating An Image At Arbitrary Scales, Translations, and Rotations
    ... at an arbitrary scale, translation, and rotation. ... If your object really is just a rectangle, it's easy enough to find its ...
    (sci.image.processing)
  • Re: EVF - is 115,000 enough? Or is 205,000-230,000 really what is needed?
    ... standard frosted focus screen (that most DSLR cameras have as original equipment) in a DSLR camera than the pixelated mess which is all you can see in an EVF when attempting manual focus on most small-sensor digicams. ... The 4x mag preview is okay in good lighting, but isn't very good at all in low light due to the amount of noise and the fuzziness of the 4x mag image in the EVF. ... I am quite good at setting the focus using the scale as I have had plenty of practice. ... All of them have a distance and DoF scale engraved on the lens-barrel. ...
    (rec.photo.digital)
  • Re: Awe at the sheer number of them all
    ... It takes light eight minutes to go from the Sun to the Earth. ... There are 365 days in a year, and the distance to Alpha Centauri is ... Let us say that someone were to build a large scale model of the Milky ... the diameter of the Earth would be less than 6 nanometers. ...
    (sci.astro.amateur)