1. Win32 questions--- + Win32Lib qs

------=_NextPart_000_0019_01BEE8C3.4D15E5A0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have a few questions about Win32 and printing.  I looked in the =
documentation, and like everything else that file contains (at least =
about making a simple window), confuses me.  Somebody know how to =
explain the order of needed routine calls IN ENGLISH?  I know you have =
to get the handle of this, the DC of that, and so on, but since i don't =
know which needs what, I dunno!  Does the new Win32Lib have printing in =
it?  When printing, can you tell Windows what font to use?  I also =
noticed that it uses winspool.dll, which what I've gotten from Win32Lib =
(mostly because its commented out), NT doesn't have.  If this makes no =
sense to you, tell me and I'll try to fix it...I hope.

Mike Hurley

------=_NextPart_000_0019_01BEE8C3.4D15E5A0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>I have a few questions about Win32 and =
printing.&nbsp; I=20
looked in the documentation, and like everything else that file contains =
(at=20
least about making a simple window), confuses me.&nbsp; Somebody know =
how to=20
explain the order of needed routine calls IN ENGLISH?&nbsp; I know you =
have to=20
get the handle of this, the DC of that, and so on, but since i don't =
know which=20
needs what, I dunno!&nbsp; Does the new Win32Lib have printing in =
it?&nbsp; When=20
printing, can you tell Windows what font to use?&nbsp; I also noticed =
that it=20
uses winspool.dll, which what I've gotten from Win32Lib (mostly because =
its=20
commented out), NT doesn't have.&nbsp; If this makes no sense to you, =
tell me=20
and I'll try to fix it...I hope.</FONT></DIV>
<DIV>&nbsp;</DIV>

------=_NextPart_000_0019_01BEE8C3.4D15E5A0--

________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

new topic     » topic index » view message » categorize

2. Re: Win32 questions--- + Win32Lib qs

Mike Hurley wondered:

> Does the new Win32Lib have printing in it?

No, not yet. I was hoping to get Llama released a month ago (it has weak
printing support), but that didn't happen. Perhaps I'll go and patch
Win32Lib to support printing in the mean time.


> When printing, can you tell Windows what font to use?

Yes. Basically, just about any graphic command you can use on the screen can
be used with a printer.


> I also noticed that it uses winspool.dll ...

I call winspool.drv; I *think* that's in NT.

In order to add printing in Win32Lib, I'd probably create a default device
called Printer. The main code changes would be to getDC() and releaseDC(),
which would have to return the DC from SelectPrinter. Printing might look
something like this:

   -- select the printer. this ensures that Printer has
   -- a DC in it from SelectPrinter.
   if choosePrinter() then

      -- start of document
      startDoc()

      -- start of page
      startPage()

        -- print something
      selectFont( Printer, "New Century Schoolbook", 12, Bold )
      moveTo( Printer, 1, 1 )
      wPuts( Printer, "Hello, World!" )

      -- end of page
      endPage()

      -- end of document
      endDoc()

   end if

As usual, I'm in the middle of a couple of other projects at the moment.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu