Announcement

Collapse
No announcement yet.

To Don Dickinson

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • To Don Dickinson

    Don,

    I deleted my topic that I started earlier this morning, so I'm
    reposting this question to you. I deleted the topic because I
    no longer needed it, as I have decided to write my own version
    of a 32-bit program that a PB/DOS or DOS Command Prompt
    can SHELL to to print out document files. Also, I wrote some pretty longwinded messages in
    that thread, which was pretty embarrassing, in retrospect.

    OK, my question: in your posting in that thread, you can gave some
    example code for obtaining a printer DC without needing to call
    up a print dialog, and in that posting you said (to paraphrase)
    "...you can then print to the printer like printing to the screen..."
    so, were you talking about PB/CC? I only have PB/DLL 6.0 for
    Windows programming. If you were talking about PB/CC, can I still
    do it with PB/DLL, if I set the EXE to run in "console mode"?
    (sorry, don't know what else to call it) Sven posted some code
    in one of our topics quite a while ago that told me how to do that,
    and I just printed out that posting. So, I don't need the sample
    code for it - I just need to know if I *do* need to use it in
    order to use the source code example you posted in our earlier
    thread for obtaining/using a printer DC.

    Thanks in advance!

    Regards,


    ------------------
    Clay C. Clear

    mailto:[email protected][email protected]</A>

    Clay Clear's Software

  • #2
    You can print to the windows print engine with either pbcc or pbdll 32-bit.
    After obtaining the dc, print with textout, etc - whatever windows calls you need to send text, graphics to the dc. It goes something like this ...
    1. get the dc
    2. call StartDoc (api call)
    3. draw on the page with textout, exttextout, whatever
    4. when done with the page, call EndPage (api again)
    5. when done with all pages, call EndDoc (api) to finish printing
    6. deletedc on the printer's dc.

    that's it.

    best regards,
    don

    ------------------
    dickinson.basicguru.com
    Don Dickinson
    www.greatwebdivide.com

    Comment


    • #3
      And,

      2a. Call StartPage().


      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment

      Working...
      X