Solved

Zoom to fit

Posted on 1998-08-25
3
359 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now