Solved

Printing from within a CDialog derived class

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 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