Solved

Printing from within a CDialog derived class

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 98
repeateFront java challenge 31 87
java ^ examples 8 58
Annoying "thing" blocks my view 4 54
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

15 Experts available now in Live!

Get 1:1 Help Now