How to do print and printpreview in non-view class?

In view class, we can do print and printpreview with OnPrint,
OnPreparePrinting, etc. function. In non-view class, how to do?

0
12/21/2005 6:08:40 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
517 Views

Similar Articles

[PageSpeed] 26

curiosity5374@yahoo.com.cn wrote:
> In view class, we can do print and printpreview with OnPrint,
> OnPreparePrinting, etc. function. In non-view class, how to do?

Not sure about preview, but you can certainly do printing fairly
easily. There's an article on the KB called "HOWTO: Print from a Class
Other Than CView (Q133275)" that shows this.

Paul.

0
paul.ganney1 (118)
12/21/2005 9:55:15 AM
Try this article for printing without the Doc/View framework:

http://www.codeproject.com/printing/print_preview.asp

Best Regards,
Abu Abdillah

0
aa_my (7)
12/21/2005 10:04:18 AM
Reply:

Similar Artilces:

XML Mapping: Creating a "non-repeating schema element" in VS2005
Question regarding XML mapping in Excel. XML Mapping in Excel allows you to map "non-repeating schema elements" to an individual cell while "repeating schema elements" automatically get handled as an Excel "list". I want a table(XML/XSD) exported from a VS2005 dataset to be CELL mappable rather than LIST mappable. Is there a way to make Excel interpret the native dataset XML/XSD as non-repeating? Said differently, what makes a schema element "repeating" versus "non-repeating"? Is it a unique XPATH statement? If my underlying table has...

To Print
Hi everybody, How to print a plan including the background format? Thanks Valdemar Hi Valdemar, Watermark, printing of, Robert Rosenberg. http://google.com/groups?threadm=%23Af%244ZZeAHA.1692%40tkmsftngp02 Also Ron de Bruin has a zip file. http://www.rondebruin.nl/files/Watermark.zip -- --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Valdemar" <valbarbosa@yahoo.com.br> wrote in message news:%23elkfYBhDHA...

Polygon Class
I am a college student and somewhat new to VB.Net I have programmed for years in VB6 and Java. I am converting a Java program to VB.Net in Visual Studio 2008. It is a Windows Forms Application. A board game with a grid of 93 hexagons as the board. In Java, I used a polygon class to create the individual hexes on the board. The Polygon class in Java has a boolean property, ".contains(x,y)", that allows me to check if a mouse click occurs in the polygon. My VB program currently uses a class to create the hexes and I have written the "contains" property t...

need to print other side of a double sided publication
I am printing a 24 page publication booklet on 8.5 x 11 paper, I printed 10 copies of one side, then a jam occured and I had to clear, then I couldn't print the other side, do I need to start over? It may depend on which version of Publisher you are using. Let the folks know. -- Don Vancouver, USA "Crod" <Crod@discussions.microsoft.com> wrote in message news:D5314A73-4173-4B84-A21C-20B3FF49DEF7@microsoft.com... >I am printing a 24 page publication booklet on 8.5 x 11 paper, I printed 10 > copies of one side, then a jam occured and I had to clear, then I coul...

Form print problem
Hi I'm not if this is the right place to post this issue, but here we go: I have a database application, which when prompted prints out a detail section of a form. This has been working nicely in access 2000, in which the application has been developed. Now I have installed access 2003, and suddenly an empty blank page is printed before the actual page. In the design view under page setup I can see that the paper size is "Letter" - In access 2000, however, the paper size was set to "A4". I can't change the setting - it always reverts to "Letter". I ...

Excel 2003 printing oddity - missing border
This is an odd one - I've got a spreadsheet that I've been printing quite happily on legal-sized paper. When I print the same document, however, on 11 x 17 paper, exactly one of the borders is not printing - it's the border between Column C and Column D. There are absolutely no other issues - everything else looks exactly the same as on legal paper, just bigger. Any clues? Many thanks - ...

VAT report should be to print without using system password
Currently when print VAT report (used for UK), tools-routines-company-vat return, need to enter system password and then can print report. Should be able to print VAT report without entering system password. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.m...

Outlook calendar printing problem
I am running Outlook 2003 on Win98 and I cannot get a weekly calendar to print starting on Sunday. I have gone to Tools->Options->Calendar Options, selected all days of the week and selected Sunday as the first day of the week. In the weekly style print setup I select left to right for arrangement and yet the printout still starts the week on Monday. If I change the first day of the week to any other day in the options menu the weekly calendar prints starting with that day of the week. For example, if I select Wednesday as the first day of the week, the printed weekly calendar sta...

excel 2003 printing problem #2
After upgrading several PC 's to Office 2003 we are having a printing problem in Excel. The user will print several print outs and all of a sudden they can no longer print. So far the only fix has been to change to a different printer or reinstall the printer. Then they will be able to print a few more sheets before it stops again. This is only happening in Excel. Word will print fine all day long with no problems. All the printer drivers have been updated. Has anyone else experinced this issue or know of a solution? The Os are XP,and Windows 2000 Pro versions. The previous Office w...

Problem printing more than one copy in excel
I have a one page document that I want to print multiple copies of. I increase the number of copies to 10 and print. The first page looks good, but the remaining 9 pages have lines missing from the tables. I have never come across this problem before. Re-define your print area and see if that helps. ...

Change View
Hi I have in a default view: My Active Accounts and I would like to change it to: Active Accounts Thanks Carlos Hi Carlos, This can be setup in the Account entity. Customize the Account Entity - forms and Views - Select Active Accounts and Set as default. This should do it. Hope this helps! Sam _______________ Inogic Innovative Logic Innovative solutions for your SME ERP/CRM products E-mail: crm@inogic.com Web: www.inogic.com -------------------------- "Carlos De la Cruz" <carlos.delacruz@gmail.com> wrote in message news:F19899E7-A9EB-4F38-BE4C-BA01991CD2C0@micro...

PS07 Task Updates performed in Timephased View and actual hours mo
We use PS07 and update our tasks daily via the My Tasks page and the Timephased view. The task updates are typically accepted everyday and the projects are published via the publish feature on the 'Applied Task Update Requests and Errors' page. Then we're seeing that hours submitted one day are not there the next day in the resources 'My Tasks' view, or they have moved to other days and have weird hours. When the project plan is opened in Project Professional, the actual hours do not match what was updated and they do not match what PWA currently shows. ...

Smartlist Builder Smartlist based on new View in SQL 2008 with GP
Hi there, I created one smartlist based on a view in SQL 2008. Smartlist is ok and working fine with my user id and sa. But when I give security access to other users, they can see the Smartlist Option but when they click it they get error message that don't have rights to one of the table used in this smartlist. I also have given them Grants through SQL Server. But no effect. What is the problem? Naseer, Check my article on the subject at http://dynamicsgpblogster.blogspot.com/2008/12/smartlist-builder-security-for-sql.html. It explains an issue similar to the one you are havin...

Chart non consecutive data
Is it possible to chart non-consecutive data. I haven't been successful in my attempts so far. Data is in same row, ie. row 4; columns needed are H4 and J4 (need to be stacked), next series is K4 , L4 & M4. Unfortunately, I can not rearrange the cells to make this easier. Any help or suggestion would be appreciated. I haven't done that much charting with Excel (2003). TIA XL doesn't stack data in the same series. It stacks one series on top of the previous. You can simulate the effect you want as follows. Select H4:J4 and create a stacked column chart. In step ...

Printing Credits
Is there a way to load a list of credits that are on different accounts and print them all at one time? Eric Hi Eric, I do not understand the question. When you say credits do you mean sales, vendors, customers, journal entries. Where and how are you loading the list of credits? Kind regards, Leslie "esf1999" wrote: > Is there a way to load a list of credits that are on different accounts and > print them all at one time? > > Eric ...

User Security Report shows accessible items as non-a
Hi, Tech Knowledge 37004 details a problem with User Security Report. It is not scheduled for a fix. I am able to fix the window security by individually checking off the problem windows and then selecting MARK ALL. I have not tested this at a Class level yet and also have been unable to get it to work for Integration Manager file access. My questions: 1) Has anyone come up with a solution to this issue, perhaps at the Report Writer level. 2) Why does sa not have access the the Alternate Great Plains Windows and Reports? What is the difference in these windows/reports? thx, Doug T...

Printing Question #5
How do I print worksheet pages from various workbooks from one worksheet. Either an Excel or VBA solution woudld be fine. Thanks, John John In VBA you could open all the workbooks and then print them, this code opens two and prints everything in each Sub PrintOtherBooks() Dim wb1 As Workbook, wb2 As Workbook Set wb1 = Workbooks.Open("C:\Book1.xls") wb1.PrintOut wb1.Close SaveChanges:=False Set wb1 = Nothing Set wb2 = Workbooks.Open("C:\Book2.xls") wb2.PrintOut wb2.Close SaveChanges:=False Set wb2 = Nothing End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampt...

Label Printing #2
In Store Operations Manager When the Wizard is used for printing labels and a quantity is entered for each individual item. Randomly the number of labels that print for each item is less than the number selected in the wizard. Any ideas ? Emer, What type of label printer and what driver are you using for that printer? -- * "Emer" <Emer@discussions.microsoft.com> wrote in message news:637B6F2D-02A6-449C-8142-073512E9C92B@microsoft.com... In Store Operations Manager When the Wizard is used for printing labels and a quantity is entered for each individual item. Ran...

Cannot view / enter any GL accounts! HELP!
I ran the Check Links yesterday. Now, I cannot see / access / view / created any GL accounts. I first thought that all disappeared as when I open the lookup window, they are all gone. However, after logging in as the sa, they are definitely all there. It appears every user lost access to do anything with GL accounts. When one attempts to manual type in a valid GL account, it simply erases itself once entry is complete. HELP! Did you check your check links reports what did they show?? Can you see the accounts as a Power User or only as sa? "Adam" wrot...

New a view for owned and shared records
I'd like to define an accounts view that shows all accounts I own and any that I'm shared on. I can't find the field with the shared information. Any suggestions? Hi, So basically you want to see all accounts to which you have access. Define criteria for filters, dont mention the owner and you will see all account to which you have read access. Just put one filter. Show me all Active Accounts. -- PLEASE do click on Yes or No button if this post was helpful or not for our feedback. uMar Khan Email for direct contact: imumar at gmail dot com "Ed Crawford" wrote:...

resizing worksheet when printing
Seem to be having problem resizing the worksheet. I went to page setup and set the scaling of 50%, but when i preview and print it still show 100%.Why is that? Previously it was printing with normally with the scaling of 50%,but now its not.Could you please help me? thanks. ACtually the option "Fit to" is not checked. Apparently on the other computer is doing fine, except the other one which doesn't seem to scale the worksheet for printing.I'm using excel 2000. Could it got to do wit the printer?? >-----Original Message----- >Ann, >-----Original Message----- &...

problems with Window.print()
Hello, We have a problem where the Window.print() command does not work from custom forms that are hosted from the isv.config file,After clicking the print button on the print dialog box, it displays the print icon on the internet explorer status bar, but does not send the output to the printer. Any ideas? ...

Print Business Card in Card Style with Company Name
Using Outlook 2007 SP2. Viewing the contacts in card style format shows the companyname field. But when printing, the companyname is not printing. How can I get it to print with the company name? ...

recursive mutex class
In the following class... class mutex { public: void lock() {WaitForSingleObject( hIOMutex, INFINITE );} void unlock() {ReleaseMutex( hIOMutex);} }; can I put... HANDLE hIOMutex= CreateMutex (NULL, FALSE, NULL); as a private object in the constructor and will this method work recursively or is the system call defective as far as recursion goes? In a single threaded test, this works fine with the object as a global handle. I just thought why not make this reentrant. Your code is incorrect. THere is no particular reason you would want to create a global handle as a mutex. At least,...

Check printing issues
I've been using Microsoft Money for 6 or 7 years, but there are still things I haven't figured out how to do (or if they are doable); my current version is Money 2003. I use the "three on a page" homeowner check style. For printing partial pages, after one check is printed, money wants me to put the rest of the checks into the printer sideways--and I always get messed up when I do this. My printer, a Brother MFC 4650, has no problem printing pages as short as 5". A single check plus the bottom tab is 5 1/4 inches, so there is no reason for me to turn the checks for a pa...