Solved

Zoom to fit

Posted on 1998-08-25
3
365 Views
Last Modified: 2010-05-18
Anybody have any idea on how to do a zoom to fit. I would like to scale down my view to a printable size. Also where do I add in the code, in the on prepareprinting, onbeginpriniting or the onprint. How do I determine how much to scale down my view size by ?
0
Comment
Question by:manx
  • 2
3 Comments
 

Author Comment

by:manx
ID: 1171214
Just a clarification. I'm using MC VC++ 1.52 . That is 16 bit Win 3.1 Application.
0
 
LVL 2

Accepted Solution

by:
AlFa earned 50 total points
ID: 1171215
I think the OnPrepareDC is the best.
You can test the Isprinting function of CDC, change your window or/nd viewport origin change the map mode to MM_ISOTROPIC or MM_ANISOTROPIC to be able to use ScaleWindowExt or /and SetViewportExt to change the scale factor.
How to determine the right values is an other problem
0
 

Author Comment

by:manx
ID: 1171216
I am drawing a schematic using lines and curves in my view. Changing the mapping mode causes the schematic to dissappear.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question