comp.lang.ada
 help / color / mirror / Atom feed
From: "Kadaitcha Man" <hahahahaha@fooq.com>
Subject: Re: Printing from within a program
Date: Tue, 9 Jul 2002 10:18:42 +0930
Date: 2002-07-09T10:18:42+09:30	[thread overview]
Message-ID: <agdbve$mj6$0@pita.alt.net> (raw)
In-Reply-To: 52oW8.863$oZ4.77897@newsfep2-win.server.ntli.net

"Fraz" <fraz@totalise.co.uk> 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










  parent reply	other threads:[~2002-07-09  0:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08 22:05 Printing from within a program Fraz
2002-07-08 22:13 ` Caenogenesis
2002-07-09  0:28   ` Kadaitcha Man
2002-07-09  0:48 ` Kadaitcha Man [this message]
2002-07-09 10:57   ` Marc A. Criley
2002-07-09 19:48 ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2002-07-09 11:09 Grein, Christoph
2002-07-09 13:05 ` Fabien Garcia
2002-07-09 13:39   ` Pheet
2002-07-09 13:05 ` Fabien Garcia
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox