Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Printing from CFormView or CDialog based applications

Posted on 2004-03-30
2
Medium Priority
?
347 Views
Last Modified: 2013-11-20
Hello everybody and I'd appreciate your help, suggestions, and/or comments on the following:

I have a viewform-based application and I need to do some printing. I don't need to print the whole form, but just some area, enclosed withing a CRect object, where I'm doing some text and graphical output. I used CFromView expecting to utilize OnPrint and other functions provided by MFC, but as far as I understand I need to override this function in order to print anything... and I'm not sure how. I found a source on Code Guru site but unfortunatelly it doesn't work for me... I have a print view, which I actually don't need, and a printer just spits out my sheets of paper without printing anything :((

I would appreciate your suggestions.
0
Comment
Question by:Yurich
2 Comments
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 400 total points
ID: 10723977
0
 
LVL 21

Author Comment

by:Yurich
ID: 10751421
thanks for your reply. i have found a couple of more sources on the net and combined with this one, i could get what i needed. in the example you advice me, i didn't quite understood the reason of using MM_LOMETRIC since it's not flexible and doesn't give you a real size of your controls... nevertheless, i rather used MM_ANISOTROPIC map mode with setting window and viewport extents... there are more question but it's a different story. thanks again
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

885 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