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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Changing Printer Page Orientation in Mid Stream

Changing Printer Page Orientation in Mid Stream

Scheduled Pinned Locked Moved C / C++ / MFC
jsontutorialquestion
5 Posts 2 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.
  • L Offline
    L Offline
    Larry J Siddens
    wrote on last edited by
    #1

    How do you change the printer orientation once it has started? I have used the samples that I can find on MSDN, but it does not change the orientaion. Like the MFCDVMD example. I use the DocumentProperties API and set the orientation, and it still does not work. I even tried ResetDC with the DEVMODE structure that I get back from DocumentProperties. Zippo! Anyone have any suggestions? Thanks in advance. --Larry

    R L 2 Replies Last reply
    0
    • L Larry J Siddens

      How do you change the printer orientation once it has started? I have used the samples that I can find on MSDN, but it does not change the orientaion. Like the MFCDVMD example. I use the DocumentProperties API and set the orientation, and it still does not work. I even tried ResetDC with the DEVMODE structure that I get back from DocumentProperties. Zippo! Anyone have any suggestions? Thanks in advance. --Larry

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      Wrongwayf16 wrote: How do you change the printer orientation once it has started? You can't. If you need to do that, simulate it in your program (rotate all your drawing by 90 degrees). I think there's an article either here or at CodeGuru for a class called CRotDC which lets you draw as normal, and then rotate the entire image by a multiple of 90 degrees. That should help :). Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
      Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

      L 1 Reply Last reply
      0
      • R Ryan Binns

        Wrongwayf16 wrote: How do you change the printer orientation once it has started? You can't. If you need to do that, simulate it in your program (rotate all your drawing by 90 degrees). I think there's an article either here or at CodeGuru for a class called CRotDC which lets you draw as normal, and then rotate the entire image by a multiple of 90 degrees. That should help :). Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
        Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

        L Offline
        L Offline
        Larry J Siddens
        wrote on last edited by
        #3

        Ryan, Thanks for the reply. I will go take a look at CRotDC. I can change the orientation of the page in mid stream, the problem is that I only see text. I do not see any graphics. Like lines, rectangles, pics, ect... I think I maybe corrupting the DEVMODE before I call ResetDC. If you have anymore suggestions or pointers to articals to help I would appericate it. --Larry

        R 1 Reply Last reply
        0
        • L Larry J Siddens

          Ryan, Thanks for the reply. I will go take a look at CRotDC. I can change the orientation of the page in mid stream, the problem is that I only see text. I do not see any graphics. Like lines, rectangles, pics, ect... I think I maybe corrupting the DEVMODE before I call ResetDC. If you have anymore suggestions or pointers to articals to help I would appericate it. --Larry

          R Offline
          R Offline
          Ryan Binns
          wrote on last edited by
          #4

          It seems my reply wasn't totally accurate :rolleyes: ResetDC can be used after StartPage() to change the print orientation, but I can't remember ever getting it to work. I've just rotated the graphics output in software. Perhaps I was just doing it the wrong way ;) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
          Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

          1 Reply Last reply
          0
          • L Larry J Siddens

            How do you change the printer orientation once it has started? I have used the samples that I can find on MSDN, but it does not change the orientaion. Like the MFCDVMD example. I use the DocumentProperties API and set the orientation, and it still does not work. I even tried ResetDC with the DEVMODE structure that I get back from DocumentProperties. Zippo! Anyone have any suggestions? Thanks in advance. --Larry

            L Offline
            L Offline
            Larry J Siddens
            wrote on last edited by
            #5

            It helps to reset the DC with the proper map modes! D'OH! --Larry

            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