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. CRichEditCtrl a WYSIWYG Control -- Don't Think So!

CRichEditCtrl a WYSIWYG Control -- Don't Think So!

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

    I have been struggling over this and I have come to the conclusion that the CRichEditCtrl is NOT a true WYSIWYG control. To see this, create a control that is say 4 inchs wide by 1 inch deep. Now use the SetTargetDevice to attach the control to your default printer, set the font of the control to be 12 pt Times New Roman. The only thing that SetTargetDevice will do is have the control look like it will print for the word break. It will not make the text within the control look like it will when it prints (spacing wise). Now draw a rectangle around the control (have the rectangle several pixels bigger in each direction from the control, since the control will overwrite the rectangle on the screen if they are the same size. If you type some text into the control, when it wraps, you may notice that where the text wraps and the area to the end of the control seems too big and could contain some text. When I first saw this, I was wondering if I didn't correctly calculate the width for the SetTargetDevice. But, when I printed, the text went up to the end of the control next to the right side of the rectangle (well, not all the way). Now if anyone can show me how to make the text spacing within the control look like it will print, please do! Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz

    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