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. Print Edit control!!!

Print Edit control!!!

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 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.
  • G Offline
    G Offline
    Gofur Halmurat
    wrote on last edited by
    #1

    hello, Does anyone know how to print CEdit's text? any ideas? thanks

    B H 2 Replies Last reply
    0
    • G Gofur Halmurat

      hello, Does anyone know how to print CEdit's text? any ideas? thanks

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

      You will get the best results and not have to worry about if the text is scrolled off the CEdit control if you get the text and use CDC::TextOut or CDC::DrawText. However, I find most people have a negative reaction to that suggestion so if your determined to literally print the CEdit to a device context, CWnd::Print should do the job. Just be forwarned, if you don't modify something (viewport extents, windows extents, etc...) in an appropriate mapping mode, it's gonna come out really, really, tiny on your printer. The best way to save a tree is to output your print tests to an Adobe Acrobat, PrimoPDF , or that new snazzy Vista XML print driver to see the results. That way you can zoom in really, really close to verify my statement. After that you can experiment until way after Thanksgiving trying everything you can think of to get around all the pitfalls associated with trying to print a CEdit control (reliably) in all possible contexts and scenarios until you are ready to pull your hair out. At that point, you can go back to my first suggestion and use TextOut or DrawText and smile once again knowing you did the right thing. :-D

      1 Reply Last reply
      0
      • G Gofur Halmurat

        hello, Does anyone know how to print CEdit's text? any ideas? thanks

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        You can get your data with GetWindowText of edit control and use of TextOut or DrawText for print it.

        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