Q: Print Preview

Hi

Can anybody show me some example code on how to call a print preview from an
SDI application in a dialog. That is, I have an SDI project which has a
dialog called via the toolbar. The is a button on the dialog which, when
pressed, should show the print preview.

Many thanks in advance

David


0
dave1107 (28)
1/14/2004 3:17:30 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
560 Views

Similar Articles

[PageSpeed] 35

The view class has several functions to do this.
Your default AppWizard MFC framework for SDI apps will already bring up the
print preview and all, except it will be blank.
The OnPaint or Draw function you override to do your drawing of your view,
will contain a CDC, which has a member function IsPrinting() or something.
Based on this, you should draw onto the printer context as if it were a
screen, with minor differences.


"David Jones" <dave@ymchwil.NODAMNSPAM.com> wrote in message
news:40055d7f$0$10053$cc9e4d1f@news.dial.pipex.com...
> Hi
>
> Can anybody show me some example code on how to call a print preview from
an
> SDI application in a dialog. That is, I have an SDI project which has a
> dialog called via the toolbar. The is a button on the dialog which, when
> pressed, should show the print preview.
>
> Many thanks in advance
>
> David
>
>


0
no6060 (315)
1/15/2004 12:21:21 AM
Reply:

Similar Artilces:

Printing to custom paper size
how do you define a "Custom paper size" in Excel 2002, I have some spreadsheets defined to print on custom paper sizes for my planner and Excel 2002 will not allow me to define a custom printer size. ...

=?Utf-8?Q?Hvordan_=C3=A5bnes_en_csv-fil_i_excel?= =?Utf-8?Q?_2007_=28Office_til_hjemmet_og_stu?= =?Utf-8?Q?di?=
Mit blodtryksapparat leverer data i form af en csv-fil. I min tidligere udgave af Excel (2000) gav det ikke problemer (heller ikke i OpenOffice); men i Excel 2007 åbnes filen i én kolonne - dvs. jeg får ikke oplysningerne fordelt ud i regnearket, så de kan bruges til beregninger af fx gennemsnit. Davs JCTC! Klikk på "Data" Velg ikonet "Fra Tekst" på venstresiden. Du må finne frem til .csv-filen på harddisken. En Wizard som kalles "Text import wizard" kommer frem. Velg "Delimited" og trykk neste. Velg "C...

Printing Multiple Copies
I have an HP LaserJet 1320. I want to print 100 copies of a one page document. I put 100 in the print dialogue box, but it only prints 1. Please help. Where did you put the 100? Running the following macro however should do it if for some reason, your printer will not do as it is being told by the Print Dialog: Dim i As Long For i = 1 To 100 ActiveDocument.PrintOut Next i -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professional basis. "Alice W." <Alice W.@di...

Printing in custom paper size
I have to print Excel data on continuous paper, 240 mm wide and 140 mm in length. I cannot find a "custom" paper size in File Page Setup - only fixed sizes for A4, letter, envelopes etc. How do I specify the correct paper size? HI Loumarie, I believe that your printer manufacturer is responsible for the most or all of the interface and the interfaces shows the OEM's logo. For my printer this works. File, Page Setup, Page (or any tab), Options under size: use custom --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://w...

Problem with pictures not showing in documents. They print okay.
Whenever I create a document in Publisher (Office professional 2003), then insert a picture, the picture does not show up until it prints out. If I click within where I THINK the picture may be, I can then see the resizing dots, but still no picture. Any way to fix this? Sam the V U Man <Sam the V U Man@discussions.microsoft.com> was very recently heard to utter: > Whenever I create a document in Publisher (Office professional 2003), > then insert a picture, the picture does not show up until it prints > out. If I click within where I THINK the picture may be, I can then ...

Another Synchornizing Subforms Q
Okay I have a main form with 2 continous subforms. Subform1 - sbfmClientSearch with a wildcard search by client field. I type "Toy" I get every client that contains this text. I placed a check box so I can select the exact client I want to see details in Subform2. Subform2 - sbfmCustDetail I'm still struggling with the check box and linking the master/child fields. Is this possible? Any suggestions. Create an invisible (visible for testing) TextBox on the MainForm. Set the ControlSource to SubFormControl1Name.FORM.IDControlOnThisForm The ID should be availabl...

q-q plots
I originally posted this in the excel.misc group but received no replies. I then found this group and it makes more sense to post here (I hope)... Is there anyone who can tell me please how to make quantile-quantile plots in excel? I have two sets of data (one with 500 records, one with 300) and I want to make a q-q plot of them. I am not sure how to handle data sets that do not have equal numbers of records. Thanks Chris Inquirer, Here's a site that might help. It notes that the sample sizes do not need to be the same: http://www.itl.nist.gov/div898/handbook/eda/section3/qqplot.ht...

=?Utf-8?Q?Identify_Label_=E2=80=94_More_than_one_c?= =?Utf-8?Q?ell_with_label?=
I have a user who gets this dialog whenever she tries to modify a formula. She wants to multiply an existing formula by the value that is in cell AV5. However, when she activates the formula bar, then types an asterisk and an A (intending, obviously, to continue to type "...V5", the Identify Label dialog immediately pops up and says there is more than one cell with this label. It shows an "a" (without the quotes). It asks the user to select the cell containing the label to use. If she types in AV5, she gets a message saying "That cell does not contain a vali...

cash drawer not opening but reciept is printing
I have installed Microsoft RMS 2.0 on Windows Vista. I had issues installing my EPSON printer TM-T88IV. It would not work when i put it as "OPOS" device but it worked when i switched it to a "Windows" Device. Now the reciept prints but the problem is that the cash drawer wont open when the reciept is printed. The cash drawer is APG VB 320-BL1616. Any ideas whats wrong with it? thanks Bad cable perhaps? Can you switch cables with another register that IS working to see if it's the cable/pin configuration? Just a thought. "Akbar Mian" wrote: > I...

Page shows up in print preview, but prints blank...
I'm trying to print a booklet with graphics on both the front and back covers. The back cover graphics and text appear fine in print preview, but when I send it to the printer, it prints blank. The front cover is fine. Help! Thanks in advance to anyone who can help me. How to troubleshoot problems that you may experience when you try to print to a local printer by using Office programs in Windows XP http://support.microsoft.com/kb/870622/en-us Have you checked the manufacturer's web page for your model printer? There maybe an updated driver. -- Mary Sauer MSFT MVP http://offi...

Calendar Printing Assistant Error
HI all, When I try to open CPA I get the following error. Cannot connect to Microsoft Office Outlook 2007. Please restart Microsoft Office Outlook 2007 and Calendar Printing Assistant. Original Microsoft Office Outlook 2007 error message: Object reference not set to an instance of an object. Does anyone have any suggestions. Thanks Gladys ...

Attempting to print silently from Word using ShellExecuteEx
I am using an ActiveX control to print input documents and their OLE attachments to the proper applications. I am attempting to have the documents print silently. I print them in a loop calling ShellExecuteEx for each one in turn. Parameters are the same for all. E.g my program receives a report with a PDF file and two embedded OLE Word attachments. My loop first prints the PDF and it prints silently with no Popups whatsoever. After successfully extracting the OLE attachments and storing them in locally saved .doc file, I print them in the same loop using the same Shell...

printing pictures in report
I am using access 2003 with win 2k pro. I have a table that keeps the path to the pictures, and I am using the VB approach to displaying them on the report. They are large photos and I believe I am running out of memory. Does anyone have a quickfix or a fix at all> Nebros, Might help to get an answer if you tell what akes you think that... Are you getting some specific error message? Is it taking a long time to print and you think it should be shorter? Do you see them in the report? -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tre...

How do I print
I use Excel for a grocery shopping list. it's now expanded to about 80 items. I'd like to be able to read the = list, but it's so long now that the type is about 3 point. What I'd like to do is print the list in 2 columns, and if it ever gets = to this size of type in 2 columns, I'd like to make more columns as necessary. =20 I tried just about every possible combo I could, but best I could come up= with was it splitting the stuff into several pages. Not necessary. 2-3 columns= on 1 page would be fine [better]. --=20 more pix @ http://members.toast.net/cbminfo/index.html...

Printing in Color
Ever since my printer has been networked by the cells in my excel if filled with color do not print in color. The print preview displays the various colors but the print is black, grey and other shades of grey. However, if there is a picture displayed on the sheet. The picture prints in all the colors. Please help! this is frustrating! ...

Q-q plot in Excel
Hi there, Just wondering if there's any way you can graph a quantile quantile plot in Excel? Any help is appreciated alohomora1234 - > Hi there, Just wondering if there's any way you can graph a quantile > quantile plot in Excel? Any help is appreciated < There's a somewhat-related approach in this five-page paper that might give you some ideas: http://www.usfca.edu/~middleton/demand.pdf The first few pages discuss some perhaps-relevant Excel features. - Mike www.mikemiddleton.com ...

print statement
Dear sir, i ve dynamics ver. 7.0 sir we have very strange problem whenever we print statement sometimes its not printing complete what i notIced that spooling is not occur correctly sometimes like if it is happened not complete pages spooled to the printer program steps to got statement is : routine-sales-statement - print thanks, -- m.abdu ...

Error Printing Excel 97 linked to access 97 on NT
When trying to print a file that is linked to acess 97 from excel 97 - get an error saying not enough memory to complete the operation. however when copying the file locally (was on a server) it works fine. Any ideas? Also if the file is printed when there is no data linked it also works ok. Other users have no problem and the printer is fine - this happens with all printers from this pc Many Thanks ...

Can i change the size of an entire publication for print?
Can i change the size of my publication without doing each box individually. i find it difficult to get everything to match up like the way i have it now. i just want it to print larger. Cannot seem to figure it out. Would appreciate any suggestions... Four Seasons <Four Seasons@discussions.microsoft.com> was very recently heard to utter: > Can i change the size of my publication without doing each box > individually. i find it difficult to get everything to match up like > the way i have it now. i just want it to print larger. Cannot seem > to figure it out. Would ...

How do I print only the current page? No longer on print menu.
Since the last update, the print menu only shows options for choosing table style or memo style. I want to know how to print only the current page, as well as how to print more than one copy of a document. How can I get the old print menu back as the default, or find these options with the new menu? --MJ What version of Outlook are you using? -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.htm Author: The Lawyer's Guide to Microsoft Outlook 2007: http://tinyurl.com/ol4law-amazon "Nana J...

Printing - Grad Announcement
I have prepared a graduation announcement. Want to print on a 5x7 scored card. Using all four sides - text, inserted pictures. Cannot get it to print Page Set-up - 8 1/2 x 11, Landscape, Bookfold - Sheets: 4 Printer Page Set-up - 8 1/2 x 11, Landscape, Normal Size, Page Range:1,2,3,4 What am I doing wrong? -- duffydhr You should not be specifying the pages, for one thing. If you are using "Book fold" then Word will automatically print pages 4 and 1 on one side and 2 and 3 on the other. If your printer does not duplex, you can duplex the job manually. Also, I ...

email printing html
For some reason when I now print an html message it prints the html markup code rather than the actual viewed email. I also found the same problem with IE8 but I clicked on Tools..Internet Options...Advanced and under the Printing area put a checkmark before "print background colors and images" and that corrected the IE problem. I had hoped it would solve my WLM printing problem also but it still prints the coding rather than the viewed email. Any ideas? I considered re-installing WLM but feared I might loose Signatures, email addresses and other valued things. ...

New Install Q
Since this group is near extinction here, I thought I would ask my final question... I finally bought a new boxed version of money deluxe on EBay. My online updating will expire soon. Is there an easy way to upgrade my license from the newly purchased disc or do I need to reinstall? Thanks for any reply & thanks for all the past help. Scott In microsoft.public.money, ScottW wrote: >Since this group is near extinction here, I thought I would ask my final >question... http://social.microsoft.com/Forums/en-US/money/threads will be available. >I finally b...

printing in money 2003
i am trying to print my products and it will only print the products will not print any other information on the same page. what am i doing wrong? ...

how can I print a sheet without the height & width being adjusted
When I use "wrap text" in excel, the height changes obviously, but when I try to print the sheet, the height changes in such a way that not all the characters are visible. Adjusting the height and width manually doesn't help either. I'm using Excel 2003. There's a maximum of ABOUT 1024 characters which will show/print in a cell. Perhaps you should use a textbox. "pb" <pb@discussions.microsoft.com> wrote in message news:90796AB5-739A-48EE-BF76-8D78BF83BB7F@microsoft.com... > When I use "wrap text" in excel, the height changes obviously, b...