?
Solved

Printing from within a CDialog derived class

Posted on 2002-07-28
4
Medium Priority
?
269 Views
Last Modified: 2013-11-20
Hi;
Ok..here are the basics...ODBC database App, Dialog Based. I have a toolbar icon that displays a CDialog based dialog box, in which is displayed several fields from database as a result of a query, in an MSFlexGrid control. To print the displayed data (in the form of an array in memory), I used the default Printing structure in the CView, since the print icon is not situated in the Dialog box where the data is displayed...the user closes the dialog, which brings him back to the form where the edit controls display the present record. When he hits the print icon, the printing is done thru the view.
My problem starts here: I have now added another CDialog based class with another grid control to display data from another query, but now I can't use the printing functions in the View again, so I guess I have to do it from the CDialog class directly. To start with, I dont necessarily need alot of code from you guys just yet...please just point me theoretically in the right direction first.
Do I have to create OnPrint() etc. in CMyDialog to start off with? What path should I take ? Thanks to all.
0
Comment
Question by:pigeonbr
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
mblat earned 800 total points
ID: 7184209
0
 

Author Comment

by:pigeonbr
ID: 7184944
mblat:
Hi..thanks for your response...from what I can see in the  link you supplied, it's really a case of starting from scratch, but keeping the same technique used in the View, and putting these new functions in the desired CDialog derived class...that's what I thought, but I wanted to make sure ..I had never had the opportunity to try it before. Should I use function names that differ from the CView names or does it matter ?
0
 
LVL 4

Expert Comment

by:mblat
ID: 7185790
Several printing tecnics provided at that address.  I am sure you can find one that will allow you to keep you printing code consistant through all application.

It is difficult to point which one to use without knowing your app. structure so try several and see what suits you the best ( if any ).

Hope it helps....

0
 

Author Comment

by:pigeonbr
ID: 7186589
Thanks for the point in the right direction!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 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