EM_SETTARGETDEVICE and RichTextBox

  • Thread starter Thread starter active
  • Start date Start date
A

active

While editing I'd like the RichTextBox display to look as the printed output
will look.

I believe EM_SETTARGETDEVICE does this. Not sure how to use it.

Do I give it the window handle of the textbox and the paper width or the
window handle of the printer and the paper width minus the left and right
offsets?

Will it really make the monitor display look like the printed output?

Any helpful comments will be appreciated,
Cal

ps
send message for EM_SETTARGETDEVICE, says
wParam
Handle to a device context for the target device.

is that a window handle or a HDC
 
I found the example I needed so I know how to try it.

I also saw an example were they used EM_SETTARGETDEVICE lParam set to 0 or 1
to set to wrap-to-window and No-Wrap respectively (WParam=0) but I could
find no documentation to support what happens when wparam equals 0.


Is using this different than setting WordWrap to true and making the textbox
width the size of the printable width on the paper?
 
Back
Top