?
Solved

Zoom to fit

Posted on 1998-08-25
3
Medium Priority
?
370 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.
Suggested Courses

800 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