Solved

print and preview for WYSWYG in SDI

Posted on 2000-02-21
2
226 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

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