?
Solved

print and preview for WYSWYG in SDI

Posted on 2000-02-21
2
Medium Priority
?
240 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
[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 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 200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

770 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