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. Printing Class Library : Bottom Margin

Printing Class Library : Bottom Margin

Scheduled Pinned Locked Moved C / C++ / MFC
c++phpcomhelpquestion
2 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.
  • D Offline
    D Offline
    DanYELL
    wrote on last edited by
    #1

    There is a great printing class here: http://www.codeguru.com/cpp/w-p/printing/article.php/c2955/ I have used it along time. One problem I have, which is really driving me crazy, is that I have a standard 8.5 x 11 sheet of paper and cant print text past 10.5". I tried adjusting the SetBottomMargin() function to: pPage->SetBottomMargin(-1) pPage->SetBottomMargin(0); pPage->SetBottomMargin(11); but none of them work. The text just doesnt print if it is too low on the page. How can print text that is close to the edge of the paper using this class or not using this class? Please, any response any one can give me will be greatly appreciated. Sincerely, Danielle Brina (an overworked graduate student)

    D 1 Reply Last reply
    0
    • D DanYELL

      There is a great printing class here: http://www.codeguru.com/cpp/w-p/printing/article.php/c2955/ I have used it along time. One problem I have, which is really driving me crazy, is that I have a standard 8.5 x 11 sheet of paper and cant print text past 10.5". I tried adjusting the SetBottomMargin() function to: pPage->SetBottomMargin(-1) pPage->SetBottomMargin(0); pPage->SetBottomMargin(11); but none of them work. The text just doesnt print if it is too low on the page. How can print text that is close to the edge of the paper using this class or not using this class? Please, any response any one can give me will be greatly appreciated. Sincerely, Danielle Brina (an overworked graduate student)

      D Offline
      D Offline
      dan o
      wrote on last edited by
      #2

      hi, i suppose that it should be changed into double CPage::SetBottomMargin(double w) { int temp=m_PrtDesc.rc.bottom; if(w > 0) m_PrtDesc.rc.bottom=ConvertToMappedUnits(w,VERTRES); if(w==-1) m_PrtDesc.rc.bottom=m_PrtDesc.n_maxLength; //m_PrtDesc.rc.right=m_PrtDesc.n_maxLength; //previous line return ConvertToInches(temp,VERTRES); } and calling pPage->SetBottomMargin(-1); :cool:

      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