By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

EM_SETTARGETDEVICE and RichTextBox

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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?


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

Any helpful comments will be appreciated,
Cal


Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.