Solved

print and preview for WYSWYG in SDI

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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.

810 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