Print out a page with a all controls

Hello
Is it possible to print out all the controls on a page.
I meam all together with one function?
Thanks
Phil1

I assume you're asking how do you print an MFC dialog with all of its controls. Is that correct? If so, try adding a method to your dialog class with this code:
CPrintDialog printDlg(FALSE);
if (printDlg.DoModal() != IDOK)
return;
DOCINFO documentInfo;
::ZeroMemory(&documentInfo, sizeof(documentInfo));
documentInfo.cbSize = sizeof(documentInfo);
documentInfo.lpszDocName = _T("Dialog Document");
HDC hdcPrinter = printDlg.GetPrinterDC();
CDC printerDC;
printerDC.Attach(hdcPrinter);
printerDC.StartDoc(&documentInfo);
printerDC.StartPage();
HDC hdcScreen = ::GetDC(NULL);
CDC screenDC;
screenDC.Attach(hdcScreen);
long screenPpiX = ::GetDeviceCaps(hdcScreen, LOGPIXELSX)
long screenPpiY = ::GetDeviceCaps(hdcScreen, LOGPIXELSY);
long printerPpiX = ::GetDeviceCaps(hdcPrinter, LOGPIXELSX);
long printerPpiY = ::GetDeviceCaps(hdcPrinter, LOGPIXELSY);
long xRatio = printerPpiX / screenPpiX;
long yRatio = printerPpiY / screenPpiY;
CRect windowRect;
GetWindowRect(&windowRect);
CRect targetRect = windowRect;
targetRect.right = targetRect.left + (targetRect.Width() * xRatio);
targetRect.bottom = targetRect.top + (targetRect.Height() * yRatio);
targetRect.OffsetRect(
-targetRect.left + (targetRect.left * xRatio),
-targetRect.top + (targetRect.top * yRatio)
CDC* dialogDC = GetDC();
printerDC.StretchBlt(
0,
0,
targetRect.Width(),
targetRect.Height(),
dialogDC,
0,
0,
windowRect.Width(),
windowRect.Height(),
SRCCOPY
ReleaseDC(dialogDC);
screenDC.Detach();
p
rinterDC.EndPage();
printerDC.EndDoc();
printerDC.Detach();
This isn't perfect, but hopefully it can get you started.
- Elton

Similar Messages

  • How to print chinese web page with netscape browserver in Solaris 9 OS ?

    Dear All,
    I would like to print chinese web page within netscape browser in Solaris 9 Traditional Chinese OS, the print out result is garbage code on the paper not correctly chinese fonts.
    I can print out correctly the chinese document create by StarSuite 7.0 on Solaris 9 OS environment and also the chinese web page is correctly display within Netscape browser but for printing is abnomal result.
    Can someone point me to how to do print chinese web page with browser in Solaris 9 environment ?
    Best Regards,
    -- Kuo

    hi
    i have encountered this problem before and i remember downloading some fonts package and installing it. u could google search your question and it should provide the solution.thats how i stumbled upon the package.
    cheers,
    bunny

  • How can I print the test page with the Arabic type from the command line

    Hi,
    I have been trying to make the tool for printing the test page from the command line on the Arabic OS. I used "rundll32 printui dll printuientry" with "/k /n" options. My tool is to print the test page in all OS when pushing the
    button.
    Normally, in the Arabic Windows, the test page is printed with RTL type when printing the test page in the "Devices and Printers". But in my tool, the test page is printed with LTR type. I'm confused because of this result.
    Is it possilbe to print the test page with RTL type when using the "rundll32 printui dll printuientry"? If it is possible, could anyone give me the hint or information for resolving?
    Please check for me.

    Hello,
    Thank you for your post.
    Your issue is out of support range of Test Tools in Visual Studio 2010 and 2012 forum which discusses Visual Studio Test issues.
    I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • OS Windows Vista Ultimate - HP LAser Jet 1000 - Firefox will not print out internet page etc...

    OS Windows Vista Ultimate - HP Laser Jet 1000 - Firefox will not print out internet page etc...
    That simple, find an page you want to print, hit the print button and zero zip zlich.
    Works just fine with IE?????

    See this: <br />
    http://kb.mozillazine.org/Problems_printing_web_pages

  • Print out of RFQ with One Time Vendor

    My customer wants print out of RFQs with one time vendor.
    As per my understandings as like other vendors this one time vendor data is not stored in any table.This data is in table ADRC. And for one time vendor no master data is there.I can see this one time address in particular RFQ.
    Now, my customer wants this one time vendor address to be printed in all RFQs.
    Is any body come across this scenario ever ?Please guide my it is urgent.
    With Best Regards,
    Rajesh

    Hi,
    The vedor(OTV or Regular vendor) will be decided after the price comparision only.
    Once the OTV (account group:CPD/CPDL) is finalised as the final vendor for procurement create a new vendor master record (With A/c group:0001) and maintain Inforecord and source list and create PO.
    Maintain all the conditions in the Inforecord from the quotations (you have the update info option from price comparision itself)
    regards,
    Kannaiah Naidu

  • PDF printing of web-pages WITH background?

    How do I make it possible to have the background image/pattern/colour etc. of a web-page included when I "print" to PDF?
    Whenever I print a web page with something in the background other than white it's missing in the PDF file. This happens in my daily-use browser (Seamonkey), but also in Safari. However, in iCab (http://www.icab.de/) the background is included in the PDF file, so at least it's possible in MacOS. I just can't find any settings for it.

    Yes, this worked! Thanks!
    Another neat trick I found is that you can save the different settings. Just go to the "presets" part of the print menu, then save the current setting. For example by naming it "PDF printing with background".
    Then turn off the background colour/image/pattern and save it as a new preset (e.g. "Print (to paper)").
    That way you don't need to waste lots of ink, but at the same time you'll get the complete web-page with background and all when you save it as a PDF file. Just remember to select the right preset before you "print".

  • Background image is gone when printing out the page

    I have a region with table and created a style as follows:
    th {font-size:9pt;font-weight:bold;background-image: url(#WORKSPACE_IMAGES#blue.gif)}
    when i print out the page, the image color for TH is gone. How to change to show the color in the print-out.
    Thanks for your help.
    Jen

    Hi,
    IE - Tools/Internet Options/Advanced - scroll down to printing and make sure the check is on "Print background colors and images"

  • Print postcards from 'Pages' with a Lexmark C544dn printer?

    I have been trying, unsuccessfully, to print postcards from 'Pages' with a Lexmark C544dn printer. As far as I can say, I have correctly set all parameters, but the output is always blank. Any ideas? FYI Lexmark have been unable to help!!

    GeoffBob wrote:
    Hi Jerry, and thanks for your response.
    What I want to achieve is a landscape postcard with one line of text across the top. I use this to stick on a few sticky notes for training workshop participants to use, to record their special interests for the session. I have done this for years with a Windows PC, MS Word and an HP4500dn LaserJet, and assumed that it would be a simple process with the new set-up (iMac, OS-X 10.7.4, iWork Pages 4.1 and Lexmark C544dn).
    I started a blank document, with the paper size set to 6 x 4 inches landscape format. I re-set the margins to suit the size of the postcard, so that the text appeared to be in the right position, on screen.
    I used the MP tray to feed the paper (there is only this one input, apart from the regular paper tray), and have tried this at the left side, in the centre and at the right side, in both landscape and portrait format.
    I have even tried putting a sheet of portrait A4 paper through, and the printing shows up two thirds towards the bottom of the sheet, across the narrow dimension of the sheet. This makes me think that the machine is 'printing' after the paper has passed through.
    Any idea what I am missing? Thanks, Geoff
    Your trial with a full size paper tells the story, I think. Your ink is missing the post card. Try again with a small card. After initiating the Print function, make sure you are seeing the expanded Print dialog with the preview on the left side of the dialog window. Does everything look OK there? Paper correct size and orientation? Text showing where it should in the preview?
    Jerry

  • How to print out a JPanel with its components

    Hello,
    I want to print out a JPanel where several components are placed in. The problem is just that neither the printAll() method nor the print() method works to do so. There's always just a print of the empty JPanel. Is there in general a possibility to print out a JPanel with its components or are I'm on the wrong way ?
    Thanx,
    Findus

    I just posted this link and it works here:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=361445&tstart=0&trange=15

  • Printing out of Photoshop with new Epson interface

    Does anyone have the proper workflow for printing out of Photoshop CS4 to an Epson 3800 with the new Epson printer preferences interface? I just upgraded to a new computer that is running Vista 64 and downloaded the Epson driver for that OS and now the print preferences window is totally changed. Most importantly I do not see any option for turning off printer color management so that Photoshop can manage color. 

    This post by Miguel may or may not be helpful:
    http://forums.adobe.com/message/2096662#2096662
    It is my understanding that when printing out of Photoshop, with "Proof" selected under Color Management, and "Photoshop Manages Colors" under Color Handling, Photoshop is performing 2 color conversions on output.
    The first is to the "Proof" profile (which for commercial print purposes describes the press condition), based on Color Settings. Then this in turn is converted to the RGB ink jet printer profile.
    With this final conversion, it changes depending on the Proof Setup options (paper color, black ink) in the Photoshop print dialog. If neither is checked, it is Relative Colorimetric, BPC enabled. If black ink is checked, Relative Colorimetric, BPC disabled. If paper color is checked, Absolute Colorimetric.
    Maybe these correlations are common knowledge but they were certainly news to me. What it means is, if you are having a lot of trouble with a print interface, you could do the necessary conversions manually and send uncalibrated RGB to the printer. Not an efficient workflow but will work if you're in bind.

  • I cannot print from web pages with mozilla, can print from internet explorer and all other programs. I have a Cannon Imageclass MF8100.

    I cannot print from any web pages with Mozilla as my browser. The printer gives me a blank page. I can print from internet explorer and all other programs. I have a
    Cannon Imageclass MF8100 printer. I spoke to Cannon as I thought it was a Cannon issue and it is not.

    Try the '''''reset''''' described here: <br />
    http://kb.mozillazine.org/Problems_printing_web_pages#Reset_printer

  • Print number of pages with Report Generation toolkit

    I use the report generation toolkit and the Print Report.vi to print a table and some text extracted from a MS Access database. The result of this is a print out that takes up several pages.
    Now, on each page i want something like (Page x of y), and I do not want to buy more expensive NI packages for this simple thing. I know it should be possible since the Report Express vi can do it --- which for me is a useless vi.
    I do not consider it a nice solution to try and keep track of the number of pages myself by dividing the table into more tables and use the new page vi between each "page table". This I would not like to do since depending on paper size, font size, and length of text strings in each cell this will be virtually impossible.
    By moving into the Print Report.vi I've tried to see if I somehow can extract the info --- I've not found anything usefull but expect a workaround to possible.
    Any suggestions?
    Cheers,
    Martin

    Hi Skinny,
    There are some tokens you can use in the headers and footers of Standard Reports generated by the Report Generation VIs.  If you take a look at [LabVIEW]\examples\reports\TextReportExample.llb\Text Report Example.vi, you'll see that the right footer text of the report has the token <pagenofm>, which generates a footer of the form "1 of 10", to indicate page 1 out of 10 pages.  There's also another tag you can use, <page>, that just lists the page number itself without a total number of pages.  If you look at the help for the Set Report Header Text.vi or Set Report Footer Text.vi, you'll see a link in the help for all the different "tokens" you can use with the report header and footer.  Actually, now that I think about it, you can use these tokens anywhere in the report, including the body text.
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page, but not all or pages 1-5.  Can this be overcome?

    I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page only, but not all or pages 1-5.  I need to go to the next subsequent page and command to print current page; continuing with this procedure until all pages are printed one at a time. Can this be overcome?

    You can use printPages(1, 5), however I need to know how you print current page.

  • HT2486 can I print out the contact info for all contacts in my address book?

    I haven't found anything on support to determine if I can just take a group with 10 contacts from my address book and print it out like a CSV file or just a plank page.
    Any suggestions if this can be done?
    Thanks in advance,
    Clay Anderson

    To print out a group, select the group name of the contacts or select them holding down the Command key and clicking on each name.  Then Addressbook > File > Print > click the Show details button > select the items below in the dialog box > select the fields to print > print or print to PDF.
    Regards,
    Captfred

  • In Acrobat Reader for Mac is there a way to print just the page with comments?

    What I mean is with my old Acrobat Pro for Mac, if I had a PDF that was 12 pages but only had comments on 3 pages, I could get a print out of the 3 document pages and the comments for those 3 pages.
    Thanks

    Following EL will do what you want:
    #{composerContext.inEditMode}In other words, the composerContext bean is available, even in a WebCenter Portal application. If you take a look at the default template (pagetemplate_globe.jspx) that is created when you create a webcenter portal application. On line 16, you see an example of the usage.
    edit: sorry... Didn't see you meant the contribution mode...
    Edit mode is by pressing ctrl+shift+e
    ctrl+shift+c is called contribution mode...
    I just looked at the source code of the content presenter taskflow and this is what they are using to show the dotted line:
    inlineStyle="#{composerContext.subView == 'contentContribution' ? 'border:2px dashed blue' : ''}">So I guess #{composerContext.subView == 'contentContribution'} will return true if you are in contribution mode. This should work both in spaces as in framework.
    Hope this helps.
    Edited by: Yannick Ongena on Jan 25, 2012 8:10 PM

Maybe you are looking for

  • Scanner not working HP Photosmart C4780

    I have OS X 10.9.5 and a HP Photosmart C4780 printer.  I'm trying to scan something to a pdf and I'm getting a black image.  When I scan an 8.5 x 11 size document as an image it only scans 1/4 of the document.  Please let me know if there is a driver

  • Deleting BOTH duplicate rows in Excel

    Hi everyone, I have just been introduced to Applescript and I was hoping to automate some things at my workplace. One of the first activities that I have been trying to figure out involves Excel 2008, which is running on a G5 (Latest version of Mac O

  • Is all usb cable including retractable ones are compatible with iPhone 3G?

    I want purchase a retractable cable on eBay but not sure if it's compatible with iPhone 3G since there is one particular auction says the USB cable is not compatible with iPhone 3G. How come? I thought all cables are universal. Thanks

  • Unable to Place Image

    For some reason I am only able to place images or edit text on some pages of my pdf document. "place image" shows up when i right click on any page, but will only place an image when "paste" shows up in the menu. the pages that i can place on are som

  • Waiting for 2 swf to load

    Hi i want to load two external swf files in frame 1 before i animate the fade effects alpha that is on top of them to reveal them in frame. I can get it to work fine for 1 swf file but cant see how to get it to work for 2??? Any help would be great t