Solved

print and preview for WYSWYG in SDI

Posted on 2000-02-21
2
213 Views
Last Modified: 2010-04-02
I plotted a graph using pDC->MoveTo and pDC->LineTo in SDI. After that, I wish to review the graph and also print out the graph. What I found is the graph is too small and overlapped. How can i preview and print the graph just the one I see on the SDI? FYI, I'm using WinApp for this program. Please guide me step by step. Thanks.
0
Comment
Question by:kitlee
2 Comments
 
LVL 1

Expert Comment

by:nutsnuts
ID: 2542804
I guess you are using MSVC++, so there is a simple way to get print preview. Just implement your drawing code in OnDraw() Function and use the parameter pDC, then select print preview from File menu, so what you see is what you will get.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 2544487
Problem is you are drawing in MM_TEXT coordinate (pixels).

Use a different mapping mode.

When drawing on the screen (to avoid lots of changes to your code), just use MM_TEXT as before.  When printing (you can ask the DC if it is for a printer or not), you select a mapping mode that results in a bigger image.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
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 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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

746 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