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. How to Print the Text in Required Format.

How to Print the Text in Required Format.

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
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.
  • K Offline
    K Offline
    kiran janaswamy
    wrote on last edited by
    #1

    hi all, i want to print the Contents of the Feilds of the Form into the Printer into the Required Alignment. my approach. CPringDialog dlg; dlg.DoModal(); CDC dc; dc.Attach(dlg.GetDC()) int h, v; h = dc.GetDeviceCaps(HORZRES); v = dc.GetDeviceCaps(VERTRES); dlg.BeginDocument(); dlg.BeginPrint(); dc.TextOut("Some Text"); //Printing towards the Printer. dlg.EndPrint(); dlg.EndDocument(); // This works fine but With GetDeviceCaps(...) i am getting the Horizontal and Verticals Coordinates of the Computer. But How to align Top,Width,Height,Bottom of the Page to Print in Correct Alignment. please help me out. thanks, uday. uday kiran

    B 1 Reply Last reply
    0
    • K kiran janaswamy

      hi all, i want to print the Contents of the Feilds of the Form into the Printer into the Required Alignment. my approach. CPringDialog dlg; dlg.DoModal(); CDC dc; dc.Attach(dlg.GetDC()) int h, v; h = dc.GetDeviceCaps(HORZRES); v = dc.GetDeviceCaps(VERTRES); dlg.BeginDocument(); dlg.BeginPrint(); dc.TextOut("Some Text"); //Printing towards the Printer. dlg.EndPrint(); dlg.EndDocument(); // This works fine but With GetDeviceCaps(...) i am getting the Horizontal and Verticals Coordinates of the Computer. But How to align Top,Width,Height,Bottom of the Page to Print in Correct Alignment. please help me out. thanks, uday. uday kiran

      B Offline
      B Offline
      Branislav
      wrote on last edited by
      #2

      http://www.experts-exchange.com/Programming/Programming_Languages/MFC/Q_20614433.html[^]

      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