Solved

MFC Print Preview Inside a DLL

Posted on 1998-09-29
5
317 Views
Last Modified: 2013-11-20
I "badly" need print preview inside an MFC DLL. The DLL provides Windows printing services for a class of applications. The print preview won't be in the release build, just during debug (sort of paper saver :-)

Concrete code samples please.  I'm not that expert in MFC doc/view.
0
Comment
Question by:ealva
5 Comments
 
LVL 3

Expert Comment

by:zhongbing
Comment Utility
if you use the doc/view template, then then print preview will be a give feature from the app wizard. if you don't use the template and want it in a dll, then the full print preview function need hard work
0
 
LVL 3

Expert Comment

by:plaroche
Comment Utility
Print Preview won't guarantee a working print operation.  There are some differences that might show up on a real printer.  There's nothing like printing to a real printer, in the meantime you might use something like a fax application that installs as a printer. You will be able to view the printed documents onscreen.
You could also install a postscript printer and print to file, then view the file with a postscript viewer.  All those solutions will require less work than your own print preview and be more efficient in proving your code.
0
 
LVL 8

Expert Comment

by:Answers2000
Comment Utility
MFC Print Preview in a DLL is the same as in an app, i.e. must like in a Doc/View application, inside the View.
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
Comment Utility
There's nothing hard about PrintPreview in a DLL at all!  If you think that things the AppWizard doesn't do for you are hard, then you're in the wrong business.

See the DLLHUSK sample (right on the product CD!) for an example of how to put a view into a DLL. The sample is trivially enhanced to provide Print-Preview in the DLL-based CView-derived class.

B ekiM

0
 

Author Comment

by:ealva
Comment Utility
Thanks. I really do not think it's hard (I did not even say it), but I do know it will take some time, which I have little right now. Anyway, I'm glad a real guru answered my question. Please forgive my laziness.

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

744 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

17 Experts available now in Live!

Get 1:1 Help Now