Solved

MFC Print Preview Inside a DLL

Posted on 1998-09-29
5
329 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
ID: 1322673
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
ID: 1322674
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
ID: 1322675
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
ID: 1322676
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
ID: 1322677
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 57
Expand to include initial dialog with two choices. 9 66
ORA-01403: no data found 43 89
twoTwo  challenge 35 92
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

932 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

12 Experts available now in Live!

Get 1:1 Help Now