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. WTL Text Printing

WTL Text Printing

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

    Hello... I like to support custom text printing in my application (without an edit control)... The wtl examples that i found at codeproject only support text printing with edit controls... I implemented the CPrintJobInfo class but unfortunely when it draw the text to the dc (in the PrintPage method) it only print the first drawing operation... For example .: bool CMainFrame::PrintPage(UINT nPage, HDC hDC) { CDCHandle dc = hDC; CString text = _T("A Test"); dc.TextOut(0,0,text,text.GetLength()); // This text is only visible on page dc.TextOut(0,20,text,text.GetLength()); dc.TextOut(0,40,text,text.GetLength()); return true; } I hope anybody can help me :confused:...

    H 1 Reply Last reply
    0
    • H HumanOsc

      Hello... I like to support custom text printing in my application (without an edit control)... The wtl examples that i found at codeproject only support text printing with edit controls... I implemented the CPrintJobInfo class but unfortunely when it draw the text to the dc (in the PrintPage method) it only print the first drawing operation... For example .: bool CMainFrame::PrintPage(UINT nPage, HDC hDC) { CDCHandle dc = hDC; CString text = _T("A Test"); dc.TextOut(0,0,text,text.GetLength()); // This text is only visible on page dc.TextOut(0,20,text,text.GetLength()); dc.TextOut(0,40,text,text.GetLength()); return true; } I hope anybody can help me :confused:...

      H Offline
      H Offline
      HumanOsc
      wrote on last edited by
      #2

      Ehmmm... I have found the bug or better my own mistake... I forget the different resolutions between the screen and printer dc... The distance between the 3 strings was to small to see them completly... For example.: dc.TextOut(0,0,text,text.GetLength()); dc.TextOut(0,400,text,text.GetLength()); dc.TextOut(0,800,text,text.GetLength()); woks...

      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