Solved

Printing from within a CDialog derived class

Posted on 2002-07-28
4
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 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