Solved

Printing from within a CDialog derived class

Posted on 2002-07-28
4
245 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 200 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

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
Add content to output file 4 62
Change owner from userA to server Local Administrators 7 59
scoreUp challenge 14 56
mapAB Challlenge 35 123
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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…
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.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

929 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

8 Experts available now in Live!

Get 1:1 Help Now