From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,HK_RANDOM_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd7d7,a1c5bd2ce0a64af3 X-Google-Attributes: gidfd7d7,public X-Google-Thread: 103376,a1c5bd2ce0a64af3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-08 17:49:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!usenet From: "Kadaitcha Man" Newsgroups: alt.os.windows-xp,comp.lang.ada Subject: Re: Printing from within a program Date: Tue, 9 Jul 2002 10:18:42 +0930 Organization: Altopia Corp. - Usenet Access - http://www.altopia.com Message-ID: References: <52oW8.863$oZ4.77897@newsfep2-win.server.ntli.net> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com alt.os.windows-xp:129962 comp.lang.ada:26955 Date: 2002-07-09T10:18:42+09:30 List-Id: "Fraz" wrote in message news:52oW8.863$oZ4.77897@newsfep2-win.server.ntli.net... > Hello > > I am using an execute procedure from within an ada program to launch the > Windows PRINT command and print a series of text files. However, Windows > brings up the print dialog box for each file - is there any way to bypass > this and just print directly ala print icon in Word etc? > > Also, Can i set the layout to be landscape automatically?? > > I want the files to print and in the correct aspect without any user > interaction? How do i do this? You stupid, gormless fuck. It has nothing to do with XP and everything to do with the Windows API. Try this... CPrintDialog dlg(FALSE); if (dlg.GetDefaults()) { /* Create a printer device context (DC) based on the information selected from the Print dialog. Using silent opening */ HDC hDC = dlg.CreatePrinterDC(); ASSERT(hDC); CDC pDC; pDC.Attach(hDC); /* put your code here */ } And you can fucking well look after the C# to Ada translation yourself. London to a brick says you know fuck all about the Windows API. -- Kadaitcha Man Moderator: alt.os.windows-xp