Printing a dialog from an SDI based application

In an SDI application that I am developing I am trying to print the
contents of a  graph hosted in a dialog...my question is can I somehow
hook into the default printing support that the SDI app has built in or
do I have to come up with a new class to support printing from the
dialog???

Dominic

0
5/14/2005 5:48:23 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
491 Views

Similar Articles

[PageSpeed] 30

Dominic,

You can indeed jack into the printing framework. It's as easy as adding an 
override to OnPrint in your view, and print to the CDC* you get as an 
in-parameter. A nifty side effect is that you'll get support for the 
print-preview this way as well.

Johan Rosengren
Abstrakt Mekanik AB

<dominicgualtieri@hotmail.com> skrev i meddelandet 
news:1116092902.887154.89600@g47g2000cwa.googlegroups.com...
> In an SDI application that I am developing I am trying to print the
> contents of a  graph hosted in a dialog...my question is can I somehow
> hook into the default printing support that the SDI app has built in or
> do I have to come up with a new class to support printing from the
> dialog???
>
> Dominic
> 


0
5/15/2005 12:00:53 PM
Thanks for the reply Johan. The only thing is that  I am not using a
view...I am using a  dialog to display graph contents...so there is no
OnPrint to overide.

Dominic

0
5/15/2005 2:44:36 PM
Dominic,

I misunderstood you - I got the impression that you wanted to print from a 
dialog rather than the view of your application. Anyway, there are lots of 
articles on printing, among them even some frameworks, that I'm sure will be 
of interest on www.codeproject.com. www.codeguru.com will most likely also 
have more than a few offerings.

Johan Rosengren
Abstrakt Mekanik AB

<dominicgualtieri@hotmail.com> skrev i meddelandet 
news:1116168276.292402.309350@o13g2000cwo.googlegroups.com...
> Thanks for the reply Johan. The only thing is that  I am not using a
> view...I am using a  dialog to display graph contents...so there is no
> OnPrint to overide.
>
> Dominic
> 


0
5/16/2005 3:54:25 PM
Reply:

Similar Artilces:

open/save dialog title broken
The title bar of any Office 2003 program's open/save dialog has just a single letter. Any ideas what's broken? tbone ...

Printing Newsletter in Publisher 2003
I have Publisher 2003 on an XP OS and trying to print a newsletter with 2 pages per tabloid size paper. I was able to do this OK with Publisher 2000. It seems that the 2003 version does not have a "Book fold" option for the layout. The Print Preview looks OK and shows page 6 and 1 for the layout. For layout I choose "Booklet". What I get is page 6 and 1 on 1/2 of the 11x17 paper. Help! Gary Gary are you printing to a laser printer??? If you are, you are running out of printer memory. Have a look in the properties of the printer driver, and change the settings from Vector...

Close dialog
Hello, On my dialog I have a CEdit control. When I type some text in the CEdit control and then press <ENTER> the dialog closes. I don't want the dialog to close. Can anybody help me? Greeting Marco Hi Marco, You need to override the PreTranslateMessage(..) Virtual function into your dialog using the class wizard. Your can implement this function as shown below, this should solve the problem. You'll just have to change IDC_YOUREDIT with the name of your CEdit object and CYourDialog with your dialog box class name. BOOL CYourDialog::PreTranslateMessage(MSG* pMsg) { ...

Move/Copy A Row Based on Formulas to a New Worksheet
I want to move several rows of sub-totals (averages within sub-groups) to a summary worksheet, but I get the Ref error. How can I copy sub-group averages to another worksheet? Thank you. high light and copy. select where you want it. edit>paste special>values. this will turn you formulas into hard numbers. you are getting the #Ref error because on the other sheet where you pasted the formulas, the formula no longer had the same references that they had on the other sheet. for example: =sum(a1:a10) in cell a11 you copy and paste on another sheet at cell a1. excell tries to compensat...

chart label reference based on the column number
In a worksheet with an embedded chart, I have a cell, S4, where I enter the number of the column I want to chart (these numbers are listed as labels in cells A2:R2). I can't figure out how to translate the number in S4 into the corresponding column letter. For example, if S4 contains "3", the chart title should be =$C$2. I think working with absolute references, R1C1, might be easier here, but somehow what I've tried, didn't work (the entire spreadsheet is based on relative addresses (A1). z.entropic in a cell (Z100) put =index(A2:G2,1,S4,1) Change G2 to whatev...

Money 2006 file repair application error
I cannot delete an old account because I get a "file may be courrupt" error so I am trying to repair my 2006 file. Following the deirections, when the progress bar almost completes, I get an application exception and send an error report to MS. My event log has 2 app errors 1) Event Type: Error Event Source: Application Error Event Category: None Event ID: 1001 Date: 4/12/2006 Time: 10:47:26 PM User: N/A Computer: xxx Description: Fault bucket 02266399. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 42 75 63 6b 65 ...

excel, worksheet, set print area, position selection on printed pa
Office 07, Excel. Print area is set, print preview displays selection, always on far left of page. I want to choose the position on the page, eg centered or right aligned etc. Help please. Hi, To get your printout to center on the page chose Page Layout, click the Page Setup quick launch button (bottom right corner of the Page Setup group). Choose the Margins tab, click Horizontal. There is no command to right align a printout, but you can change the left margin to force the printout to the left. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Eve Al...

Can't edit print styles in Outlook 2007
Weekly calendar view to print - Define print Styles - Edit "CANNOT DISPLAY THE DIALOG BOX" I'm using trial version - shouldn't be the case???? thks I'm having the same problem where I cant edit the print syles ... please let me know what ou find out. I think being able adjust the format and print the calendar is important, as I usually print my calendar. EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com Nate This is an Excel newsgroup. I would suggest posting this to an Outlook one -- HTH Nick Hodge Microsoft MVP - Excel Southampton...

Application hanging on file load...
Okay, I'm having the strangest problem, and I'm hoping somebody here will be able to give me an idea of how to attack it... I have an MFC application that does some networked communication, multi-threading, fun stuff... I also load and save xml configuration files. Now, on most of the computers I've run my software on, I have absolutely no problems. On SOME boxes, however, whenever I use my menu to try to load or save a file... before the File Dialog box even comes up... the application hangs. All the boxes I've tried this on have been Windows 2000 boxes with Service Pack 4....

Cannot Print a selection of ToDo's
I have a user who is having an issue when attempting to print a selection of his Todo list. The print dialog will appear but as soon as he clicks either print or print preview the dialog dissapears and no jobs are sent to the print que. He is able to print other documents to this printer and the issue occurs with all other printers installed (including a PDF printer). Computer is running Vista business 32 bit w/ Vista SP2. Office 2007 Small Business with Office SP2. ...

How can I parse or Loop a list based on single field to Googlemaps
This is some code that will parse each sequential field [Point_#) into a list for googlemaps. [Form_Runs].WebRouteMap.navigate "http://maps.google.co.uk/maps?f=q&hl=en&q=" & "from: " & Me.Point_1 & (" to: " + Me.Point_2) & (" to: " + Me.Point_3) The table/form is laid outlike this: [Route_No] [Point_1] [Point_2] [Point_2] 5 North St, N1 East St, N3 High Road, W6 And the code will give this style of parsed list: from: North St, N1 to: East St, N3 to: High Road, W6 That works just ...

Changing default Print copies
Hi, I have a workbook that has a worksheet with default printing copies of 3. Even when I go to page setup and change the number of copies to print to 1 it will automatically revert to 3 the next time I bring up the print dialog. I have also looked through the VBA editor at the worksheet for any oddities and have found none. Does anyone know how to change this permanently? Thanks in advance. Pach >Even when I go to page setup and change the number of copies to > print to 1 it will automatically revert to 3 the next time I bring up > the print dialog. Look at the defaults for you...

SDI: Switching between main SDI app windows
I want to be able to allow the end-user to pick between medium and large font sizes for the various controls on the main SDI application window. This windows has several radio-button-groups, a CTreeCtrl, and a CRichEditCtrl. When I use the form editor to lay out the main SDI app window, I'm now using Arial 8. If I change the Properties for the entire window to something larger (like Arial 10 or 14), then all the controls have the font-size increased, and the controls themselves get bigger. This seems like an easier approach than changing the font size for each control, and figuri...

Rule to automatically mark header to download based on contact list?
Is there a way to do this, or an add-in? TIA. Rich On Tue, 26 Apr 2005 04:44:35 -1000, rmc <rmc@nospam.com> wrote: > Is there a way to do this, or an add-in? What version of Outlook are you using? -- -Ben- Ben M. Schorr, MVP Hi Ben: 2003 SP1 Rich "Ben M. Schorr - MVP" <bens@bogusaddress.mvp> wrote in message news:op.spuxh8sf6r4cx1@bms-tablet2.scgab.com... > On Tue, 26 Apr 2005 04:44:35 -1000, rmc <rmc@nospam.com> wrote: > > > Is there a way to do this, or an add-in? > > What version of Outlook are you using? > > > -- >...

printer not printing in black or red
I have an Epsom sx200 printer, I have recently changed the red and the black ink and now it will not print in these colours. I can not open the ink unit to check it is replaced correctly, the ink that I have used is different to the normal Epsom ink that I have been using in the past (more ink for less money). please could someone help? Thanks Andy Not in a Word forum! It's not impossible that Epson will claim you voided your warranty by using alien inks. On May 23, 7:30=A0am, Andy Banks <Andy Ba...@discussions.microsoft.com> wrote: > I have an Epsom sx200 pri...

Restrict dialog resizing
Hello There My dialog is resizable, how can I restrict the resizing to some minimum limit. Means you can't make it small in width and height beyond a certain limit. Should I need to override WM_SIZE. Thanks in advance. "Roland" <ajay.sonawane@gmail.com> wrote in message news:69c0226e.0411260451.4b820b77@posting.google.com... > Hello There > My dialog is resizable, how can I restrict the resizing to some > minimum limit. Means you can't make it small in width and height > beyond a certain limit. Should I need to override WM_SIZE. > Thanks in advance. WM_...

11x17 Printing
I am having problems with printing a 11x17 document to a Konica Minolta C-350 purchased in May of 2005. I am on a time cruch and would appreciate any help. Are you the same person who posted the same question earlier this week? -- JoAnn Paules MVP Microsoft [Publisher] "Mulkey" <Mulkey@discussions.microsoft.com> wrote in message news:F57FAAC5-C73A-4C07-B1D1-7E32E3481B3E@microsoft.com... >I am having problems with printing a 11x17 document to a Konica Minolta >C-350 > purchased in May of 2005. I am on a time cruch and would appreciate any > help. I may...

how to format and print labels from an excel file
I have an excel list of people with 12 cells of information. I want to format and print "name tags" (labels?) using only the information in four cells. How can I do this? You can print labels in Excel but formatting can be a problem. Best to use Word for the mailmerge operation and select the 4 labels to print during the setup in Word. For help on Word mail merge using Excel as the data source. http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge/CreateAMailMerge.htm http://www.mvps.org/word/FAQs/MailMerge/CreateADataSource.htm And a t...

Mailing Label printing
I have created several mailing labels using SQL Reporting services and am attempting to print them with a Intermec pd-41 label printer. Every time a report is Printed the size settings for the job changes to 1.5w 4h instead of the setting within Windosw of 1.5h 4w. I have changed and saved the settings on the printer in the printer settings via Windows. The end users for this product cannot be bothered to click properties every time they are printing a label. Has anybody else experienced this or know of a way to correct this. Within Visual Studio, look at the report properties w...

Dialog based problem in vc6
Hi, I am writing an mfc project in vs6 and I have a problem! When I add radio button to my dialog based application and run the application and press that button my application hang, even when I try to run it in the test mode inside visual studio and press that radio button it stack the all environment why?? It append only if I add a radio button for a regular button its all ok! I install sp-6 but it didn't solve the problem. Thanks "Dave" <dbg@012.net.il> wrote in message news:eq14GyguEHA.3872@TK2MSFTNGP11.phx.gbl... > Hi, > > I am writing an mfc project in ...

Printing in a Citrix Environment
Hi, We have just implemented GP 8.0 for a customer with branches scattered around the country. Users access Great Plains server through Citrix. 1. Users have complained that printing reports is extremely slow. E.g. 70 page Trial Balance report takes 2 hours to process and printout. Is there a way to speed up the printing? We have already installed all drivers on the Citrix server. 2. In this situation, how do I implement Named Printers (Users want to default report printing to a HP laserjet and check printing to a dedicated dot matrix Epson printer)? 3.One user complains that on printin...

MFC DLL Dialog Box
Hello All, I am trying to link a MFC DLL to a MFC executable. The MFC DLL has a dialog template in it and has one entry point function in it. Dialog box template has the corresponding class as CLoadDlg. >From the executable I call the entry point function. Everything is working fine till this point. Now in entry point function I am creating a dialog box object and trying to display the dialog box (by calling DoModal). But this is not working and I see an assertion failure. Can someone give me some hints on how to get this dialog box up from the DLL. In DLL: ======= extern "C" ...

Rounding generated on funds application
We are finding that an incorrect rounding entry is being created when we apply a cash receipt against a receivables invoice. The rounding amount generates an entry something like: DR AR 13,317.05 CR Rounding 13,317.05 We would have expected the rounding to be in the pennies, not thousands. The rounding amount almost equals the total amount of the invoice. The invoice & payment both balance in the functional currency without this additional rounding entry being created. Any idea how to prevent this from happening? We're having to do a journal entry to back this out each time it hap...

Check printing in GP 7.0
Dear Guys, I have check payments for vendors, where I'm dealing with LOCAL CURRENCY & FORIGHN CURRENCY. When I paid by check in LOCAL CURRENCY then the amount in words prints perfectly but if i paid by check in FORIGN CURRENCY then the amount in word prints in numeric which i want to print amount in words instead of numbers. Please help me to print checks amount in words for FORIGN CURRENCY as well. Your suggestion would be appricated on above issue thnx Shamin ...

Common uses for XML in an asp web application
I recently created an application that used an xml file to define 4 different groups used for my app, and within each of those groups are <item></item> tags to declare different values that were used to lookup values in a database. This worked pretty well to allow me to dynamically create navigation buttons to perform operations etc.. Now i am trying to think of other common uses for xml that would make my apps even more scalable. I think I could have used xml again in my app for this operation althought i did not because of time constraints: Once records were grabbed from the d...