Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Choose printer automatically

Choose printer automatically

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kleser
    wrote on last edited by
    #1

    Hi all, How can i make my application to choose a printer other than the default printer programmatically? thanks:laugh: kleser

    D A 2 Replies Last reply
    0
    • K Kleser

      Hi all, How can i make my application to choose a printer other than the default printer programmatically? thanks:laugh: kleser

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Call:

      OpenPrinter()
      StartDoc()
      StartPage()
      EndPage()
      EndDoc()
      ClosePrinter()


      "One must learn from the bite of the fire to leave it alone." - Native American Proverb

      K 1 Reply Last reply
      0
      • D David Crow

        Call:

        OpenPrinter()
        StartDoc()
        StartPage()
        EndPage()
        EndDoc()
        ClosePrinter()


        "One must learn from the bite of the fire to leave it alone." - Native American Proverb

        K Offline
        K Offline
        Kleser
        wrote on last edited by
        #3

        thanks for your reply, this works with MFC? thanks

        B D 2 Replies Last reply
        0
        • K Kleser

          thanks for your reply, this works with MFC? thanks

          B Offline
          B Offline
          bugDanny
          wrote on last edited by
          #4

          Kleser wrote: thanks for your reply, this works with MFC? Yes. You can try CPrintDialog. Danny

          1 Reply Last reply
          0
          • K Kleser

            thanks for your reply, this works with MFC? thanks

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Kleser wrote: this works with MFC? Yes. You'll also want to check out the CDC class as it has most of these as member functions.


            "One must learn from the bite of the fire to leave it alone." - Native American Proverb

            1 Reply Last reply
            0
            • K Kleser

              Hi all, How can i make my application to choose a printer other than the default printer programmatically? thanks:laugh: kleser

              A Offline
              A Offline
              Anonymous
              wrote on last edited by
              #6

              Search MSDN for SetPrinterDevice - there is function you can write in CApp to change app current printer by name. Then default MFC printing routine will use it. Contact me in private, if you will not find it - I will send it to you. Igor Green http://www.grigsoft.com/ Compare It! + Synchronize It! - files and folders comparison never was easier!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups